Addtorque

From DeltaWiki
Revision as of 06:49, 3 December 2023 by Xan (talk | contribs) (Created page with "{{feature|1125|5.1}} 200px|thumb|Torque. The '''addtorque''' command applies a momentum vector (''pitch'' ''yaw'' and ''roll'') onto a physical object. The rotation 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....")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search
Addtorque
Build

1125

Version

5.1

Torque.

The addtorque command applies a momentum vector (pitch yaw and roll) onto a physical object. The rotation 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

addtorque pitch yaw roll [ltm] [name=name]

pitch

The rotation axes of the momentum applied onto the object is the X world axes (west - east), unless the option ltm was used, than it is the X axes of the object regardless of its own rotation.

yaw

The rotation axes of the momentum applied onto the object is the Y world axes (up - down), unless the option ltm was used, than it is the Y axes of the object regardless of its own rotation.

roll

The rotation axes of the momentum applied onto the object is the Z world axes (south - north), unless the option ltm was used, than it is the T axes of the object regardless of its own rotation.

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 torque applied to.

Examples

activate addtorque 0 12 3

When the user clicks the object, it will add a momentum of 12 Newton Meter onto the object and it will start to rotate around the world Y axes. It also adds a momentum onto the object, causing it to rotate around the Z, south-north, axes.

See also

Object Scripting

Building2.jpg

Triggers: CreateBumpActivateAdoneAtCollideSdoneEnter ZoneExit Zone

Commands: AddforceAddtorqueAlpharefAnimateAstartAstopCameraColliderColltagColorCoronaEnviExamineFrameGroupLightLinkLockMatfxMediaMidiMoveNameNoiseOpacityPictureRotateSayScale SeqShadowShearSignSkewSkyboxSolidSoundTagTeleport / TeleportxTextureTimerURLVelocityVisibleWarpWeb