Global Gravity
by MichaelDom · in Torque Game Builder · 09/07/2010 (7:06 pm) · 2 replies
I have looked at the documentation and trolled the forums but have not found an easy to set a global value for gravity in Torque/iTorque 2D. It seems odd that there wouldn't be a way to do this in TGB or TorqueScript. I would appreciate any help and am sure that this if a fairly simple process and I'm just missing something.
#2
Each t2dSceneObject has its own "setConstantForce" call so you can controls this on individual objects as well. Note that if you have a scene-wide constant force and an individual object constant force they are summed, one doesn't replace the other.
Melv.
09/10/2010 (10:17 am)
You can call "setConstantForce(...)" or "setConstantForcePolar(...)" on the t2dSceneGraph. This affects all objects in the scene. Note the "gravitic" option which makes the force affect the object irrelevant of its mass like real gravity.Each t2dSceneObject has its own "setConstantForce" call so you can controls this on individual objects as well. Note that if you have a scene-wide constant force and an individual object constant force they are summed, one doesn't replace the other.
Melv.
MichaelDom
Default Studio Name