Entity is the rendered asset in the scene. If you have no physics applied to an entity in the scene, then you can use the entity.move() command as normal. However, if you have physics action "Physics RigidBody" attached to the entity you are scripting, then you would have to use the physics.library() commands(generally forces for dynamics) to move the body as the physics body moves and rotates the entity in the scene automatically as part of skyline's main frame update. This is why when you place a dynamic ball in the scene it falls but there is no more movement code required.
Now, this paradigm changes when it comes to characters and there are 2 different routes:
1) Using the action
"Simple Character Controller"(SCC). If you use this action, then the character capsule is setup via the action and you need to use the
character.library() functions to move the capsule around, which in turn moves the rendered entity.
http://www.chi-ad.com/Skyline/API/Lua/html/classcharacter.html2) If you have no actions applied apart from a micro script and you dynamically spawn the character capsule through the DCC system. Then you need to use the lua
controller.library() commands instead of the character ones.
Confusing i know and we have plans of improving these.
http://www.chi-ad.com/Skyline/API/Lua/html/classcontroller.htmlFor both of these character/controller systems, since a physics character capsule does not rotate, the forward movement applied to the character.library() functions is that of the entities forward axis. So for example, if you call move on the character controller using character.move(obj, 1), then the character will move in the entities forward direction. If you were to rotate the entity using the entity.yaw() command, the move of the character controller would start the turn the character around.
This is the same for both the character and controller lua libraries.
So to recap:
* No physics at all: entity.library() commands.
* Rigidbody applied to entity: physics.library() commands
* SCC action applied(no rigidbody): character.library() commands.
* DCC action applied(fully scripted): controller.library() commands.
Hope this helps