Game Development Community

Can't load in editor - 'No shape name defined'

by Alex Hicks · in Torque 3D Professional · 05/29/2013 (7:23 am) · 6 replies

I'm still fairly new to torque.
I am using Torque 3.0 with PhysX

I have created a door object that has functions to move it across and back to its original position in c++, i'm just having trouble actually loading it in the editor. Previously i made this as a copy of staticShape - could load it into the level - but i realized it needs to be a physicsShape in order to have a collision mesh. As far as i know, i have the exact same object but in a physics shape, it's exec'd and the path for the model is correct. The model has the dummy nodes required and a collision mesh.

It does not appear in the editor and i just get 'no shape name defined...' when i load up my level. If anyone could help that would be great. My assignment for school requires a c++ change, so this is quite necessary.

I'd be extremely thankful for anyone to help.

//door1.cs-----------------------

datablock physicsDoorData(Door)
{
shapeFile = "art/shapes/Door/Door1.dae";
category = "Doors";
openDistance =5;
};

function physicsDoorData::create(%block)
{
%obj = new physicsDoor()
{
dataBlock = %block;
parentGroup = EWCreatorWindow.objectGroup;
};
return(%obj);
}

//---------------------------

About the author

Recent Threads


#1
05/29/2013 (8:48 am)
Are you sure you really need a collision mesh for a door? Can't just use the bounds for collision?

Might also consider inheriting from GameBase - has more features related to handling game-related events on objects. Actually, I think most door resources rely on TSStatics - perhaps you could inherit from that and go from there.

And now that I think about it, getting objects to behave properly in the editor is a tricky thing. Hopefully we can get a guide together for that process before too long....
#2
05/29/2013 (10:01 am)
I guess it's more of a moving wall than a 'door', I'll have a look at GameBase. Thanks :)
#3
05/29/2013 (10:26 am)
Quote:
shapeFile = "art/shapes/Door/Door1.dae";
shapeFile should be shapeName for PhysicsObjects... I think. Unfortunately the various classes aren't consistent about using shapeFile vs shapeName.
#4
05/30/2013 (5:25 am)
Oh my god thankyou..
#5
05/30/2013 (6:36 am)
Wait--"Editor?" Did I miss something? :P
#6
05/30/2013 (8:18 am)
You sure did - the move from 2D to 3D .... ;p