How to add Physics Actor on primitive cube?

How to add Physics Actor on primitive cube?

Anonymous
Not applicable
750 Views
2 Replies
Message 1 of 3

How to add Physics Actor on primitive cube?

Anonymous
Not applicable

Hi,

 

This might be a dump question, all I want is to create a cube from the create panel and add physic on it. So it will drop down once the game start.

 

I right click on the cube in scene and open unit editor, but it tells me "The unit "cube_primitive.unit" could not be opened". And without selecting any unit on the unit editor, I cannot add any physic actor on it. How can I possibly achieve that?

 

Derek

Reply
Reply
0 Likes
751 Views
2 Replies
Replies (2)
Message 2 of 3

paul.kind
Alumni
Alumni

Well, here is one easy way to do it.  Not the most streamlined, but it does work. 

 

1. Create your cube object (or any other primitive)

2. Select the cube/primitive

3. Select File > Export Selected

4. Expor tthe FBX

5. Now just import to stingray and the model will be like any other object.

 

Ill check to see if things like physics are enabled by default (i believe they are) but in any case this is a useful workaround to make the object just an asset in your game.

Areas of Expertise - MayaLT : Mudbox : 3DS Max : Inventor : Game Dev
Follow me on Twitter : @paulkind3d

Please remember to give kudos freely and mark acceptable answers as solved!

PLEASE do not send me private messages unless asked to do so. If you have a question, start a thread, and ask me on the public forums where answering your question may help others.

Did you know there was a YouTube learning channel for Autodesk Games? New videos are posted regularly with all sorts of content relative to Stingray, Maya/MayaLT, 3DS Max, and other game related tools. Get your game on @ https://www.youtube.com/user/autodeskgameshowtos
Reply
Reply
0 Likes
Message 3 of 3

andrew.grant
Alumni
Alumni

You will need to add physics to your unit and set it to Dynamic. See the documentation here:

 

http://help.autodesk.com/view/Stingray/ENU/?guid=__stingray_help_creating_gameplay_physics_create_ph...

 

You can try this out on the Chamfbox unit that is in the basic template.

 

One thing that is important to note - your 'unit' will not move unless you specify the 'Node' for the physics actor to be 'StingrayEntityRoot'. If the node is set to the mesh ('ChamfBox_01' if using the chamfbox) only the mesh will move. This can yeild unexpected results - such as sounds attached to the unit will not move with the mesh node.

Reply
Reply
0 Likes