Addforce

From DeltaWiki
Jump to navigation Jump to search
Addforce
Build

1125

Version

5.1

Sir Isaac Newton sought to describe the motion of all objects using the concepts of inertia and force, and in doing so, he found that they obey certain conservation laws.

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

Object Scripting

Building2.jpg

Triggers: CreateBumpActivateAdoneAtCollideSdoneEnter ZoneExit Zone

Commands: AddforceAddtorqueAlpharefAnimateAstartAstopCameraColliderColltagColorCoronaEnviExamineFrameGroupLightLinkLockMatfxMediaMidiMoveNameNoiseOpacityPictureRotateSayScale SeqShadowShearSignSkewSkyboxSolidSoundTagTeleport / TeleportxTextureTimerURLVelocityVisibleWarpWeb