Addforce
Build |
1125 |
Version |
5.1 |
The addforce command applies a force onto the object given in a direction vector (x y z) and optionally a momentum vector (pitch yaw and roll). The direction of the force is given in world coordinates, unless the option ltm is used. The momentum causes a spin around the object's own geometric center.
If the applied directional forces are too strong, objects may fly through other colliders without actually colliding with them.
Usage
addforce x y z [pitch yaw roll] [ltm] [name=name]
x y z
The forces into the direction of the 3D axes. The actual applied direction depends if ltm was used.
pitch yaw roll
The direction of the momentum applied onto the object. The actual rotation axes depend if ltm was used.
ltm
The optional ltm statement sets to use the object's local space insteed of the world global coordinate space.
name
The optional name argument specifies which physical objects with the given name will have the force applied to.
Examples
activate addforce 30 0 0 10 0 10
When the user clicks the object, it will add a force of 30 newtons onto the object and it will start to move to the west. It also adds a momentum onto the object, causing it to rotate around the x (west-east) and z (north-south) axes.
See also
- Force at Wikipedia.
|
|
Triggers: Create • Bump • Activate • Adone • At • Collide • Sdone • Enter Zone • Exit Zone Commands: Addforce • Addtorque • Alpharef • Animate • Astart • Astop • Camera • Collider • Colltag • Color • Corona • Envi • Examine • Frame • Group • Light • Link • Lock • Matfx • Media • Midi • Move • Name • Noise • Opacity • Picture • Rotate • Say • Scale • Seq • Shadow • Shear • Sign • Skew • Skybox • Solid • Sound • Tag • Teleport / Teleportx • Texture • Timer • URL • Velocity • Visible • Warp • Web |