Apply a force to the node
| <node3d>.applyForce( | |
| dir | |
| duration = 0 | |
| mode = viz.ABS_GLOBAL | |
| pos = None | |
| posMode = viz.ABS_GLOBAL |
)
dir
The force vector. The length of the vector determines the strength of the force.
duration = 0
The length of time that the force is applied to the node. A value of 0 means the force will be applied for one time step.
mode = viz.ABS_GLOBAL
One of the following modes:
Force modes |
|
viz.ABS_GLOBAL |
The force vector is specified in global coordinates |
viz.ABS_LOCAL |
The force vector is specified in the objects local coordinate system. |
pos = None
The position from which the force will be applied. If this value is None, then the force will be applied on the center of mass of the object.
posMode = viz.ABS_GLOBAL
One of the following modes:
Position modes |
|
viz.ABS_GLOBAL |
The position is specified in global coordinates |
viz.ABS_LOCAL |
The position is specified in the objects local coordinate system. |
NOTE: This command has no effect if physics is not defined on the node.
None
<node3d>.applyTorque
<node3d>.getAngularVelocity
<node3d>.getVelocity
<node3d>.setAngularVelocity
<node3d>.setVelocity