 | RigidbodyXApplyTorqueToAchieveTargetRotation Method (Rigidbody, Quaternion, Quaternion, Single) |
Applies torque to the specified
Rigidbody to achieve the specified
targetRotation in the space of the
referenceFrame.
Namespace: Candlelight.PhysicsAssembly: Assembly-CSharp-firstpass (in Assembly-CSharp-firstpass.dll) Version: 0.0.0.0
Syntaxpublic static void ApplyTorqueToAchieveTargetRotation(
this Rigidbody rigidbody,
Quaternion targetRotation,
Quaternion referenceFrame,
float strength = 1f
)
Parameters
- rigidbody
- Type: Rigidbody
Rigidbody. - targetRotation
- Type: Quaternion
Target rotation. - referenceFrame
- Type: Quaternion
Reference in which targetRotation is specified. For example, if
targetRotation specifies a local rotation, this value is the parent's world rotation.
- strength (Optional)
- Type: SystemSingle
Strength value by which to scale result.
Usage Note
In Visual Basic and C#, you can call this method as an instance method on any object of type
Rigidbody. When you use instance method syntax to call this method, omit the first parameter. For more information, see
Extension Methods (Visual Basic) or
Extension Methods (C# Programming Guide).
See Also