Skip to main content

PhysicsBody

The PhysicsBody class interacts with any sort of Rigidbody attached to an Item.

To get a PhysicsBody from an item, use the GetComponent method.

let physicsBodyComponent = item.GetComponent("PhysicsBody")

You can then use the physicsBodyComponent property to access the PhysicsBody class.

Methods

Method NameReturn TypeParametersDescription
GetIsKinematicboolnoneGets if the RigidBody is Kinematic
SetIsKinematicvoidboolSets the RigidBody's isKinematic
GetUseGravityboolnoneGets if the RigidBody is using gravity
SetUseGravityvoidboolSets the RigidBody's useGravity
GetVelocityfloat3noneGets the velocity of the RigidBody
SetVelocityvoidfloat3Sets the RigidBody's velocity
GetAngularVelocityfloat3noneGets the angular velocity of the RigidBody
SetAngularVelocityvoidfloat3Sets the RigidBody's angular velocity
ResetCenterOfMassvoidnoneResets the RigidBody's center of mass
GetWorldCenterOfMassfloat3noneGets the RigidBody's world center of mass
GetCenterOfMassfloat3noneGets the RigidBody's center of mass
SetCenterOfMassvoidfloat3Sets the RigidBody's center of mass