Difference between revisions of "Editing scene"
From XStoryPlayer Wiki
Line 7: | Line 7: | ||
[[file:maya_colliders1.jpg|600px]]</li> | [[file:maya_colliders1.jpg|600px]]</li> | ||
<li>Now open the <code>scene.ini</code> file and add: | <li>Now open the <code>scene.ini</code> file and add: | ||
+ | <syntaxhighlight lang="cpp"> | ||
rb "collShape1" | rb "collShape1" | ||
{ | { | ||
Line 17: | Line 18: | ||
} | } | ||
} | } | ||
+ | </syntaxhighlight> | ||
+ | This code says that the rigidbody "collShape1" contains 4 physics (collider) objects. The default type for the objects is a BOX.<br> | ||
+ | Maya objects are render objects by default. This means that any objects you create in Maya that is not described in the .ini file will show up as a rendered object. | ||
+ | Because the collider Maya objects are referenced now they are not rendered to the scene anymore. | ||
</li> | </li> | ||
</ol> | </ol> |
Revision as of 10:57, 12 January 2015
In this tutorial we will change the 'Spaceship' scene so that: there are colliders, the door of the cell can open, there are some objects in the cell, there is background sound.
The final result can also be found in the 'Tutorial resource pack', but it would be best to create it using this tutorial yourself.
- Open the spaceship scene in Maya. Add a few boxes (cubes) like this:
- Now open the
scene.ini
file and add:rb "collShape1" { physics { elem[0] {mesh = "collShape1";} elem[1] {mesh = "collShape2";} elem[2] {mesh = "collShape3";} elem[3] {mesh = "collShape4";} } }
This code says that the rigidbody "collShape1" contains 4 physics (collider) objects. The default type for the objects is a BOX.
Maya objects are render objects by default. This means that any objects you create in Maya that is not described in the .ini file will show up as a rendered object. Because the collider Maya objects are referenced now they are not rendered to the scene anymore.