Skip to content

Physics.Body

Name Mandatory Description Default Type
⬅️ Input The input of this shard is ignored. Any
Output ➡️ Outputs the physics body created by this shard as a physics object that acts as an interface for other physics shard to interact with the body. Physics.Body
Location No The initial location of the physics object. The variable provided in this parameter is also updated through the physics simulations conducted on this body. Vice versa, the body's location is also updated if the variable's value is changed. none Var(Float3)
Rotation No The initial rotation of the physics object. The variable provided in this parameter is also updated through the physics simulations conducted on this body. Vice versa, the body's rotation is also updated if the variable's value is changed. none Var(Float4)
Static No If false, the physics body will be destroyed when the shard is not activated. If true, the body will persist and be included in the physics simulation even if the shard is not activated. false Bool
Enabled No Can be used to toggle the body on or off if it is a persistent body. If false, the body is temporarily removed from the simulation without destroying it. true BoolVar(Bool)
Shape No The shape of the body. none Var(Physics.Shape)
Friction No The friction applied when this physics body is in contact with another physics body. 0.2 FloatVar(Float)
Restitution No The bounciness of the body when it collides with another physics body. 0 FloatVar(Float)
LinearDamping No How much linear velocity decays over time. 0.05 FloatVar(Float)
AngularDamping No How much angular velocity decays over time. 0.05 FloatVar(Float)
MaxLinearVelocity No Max linear velocity 500 FloatVar(Float)
MaxAngularVelocity No Max angular velocity 47.1239 FloatVar(Float)
GravityFactor No The gravity factor applied to this body 1 FloatVar(Float)
AllowedDOFs No The translation and rotation axes that the body is allowed to move and rotate around. PhysicsDOF::<invalid> PhysicsDOF[PhysicsDOF]Var([PhysicsDOF])
MotionType No Motion type of the body, Dynamic, Kinematic, or Static. PhysicsMotion::Dynamic PhysicsMotionVar(PhysicsMotion)
CollisionGroup No The collision group this body belongs to and which collision groups it is allowed to collide with. The first component in the int2 dictates collision group membership mask, the second part contains a filter mask. @i2(-1 -1) Int2Var(Int2)
Sensor No If true, this physics body will be considered a Sensor. Sensors only detect collisions but do not interact with collided objects (AKA triggers) false Bool
Mass No Mass of the body. For mass less or equal to 0, default mass calculation is used instead. 0 FloatVar(Float)
Tag No Tag attached to this body for use in collision events. none Any
Context No The physics context object that is managing the physics simulation. Var: Physics.Context Var(Physics.Context)

This shard creates a physics body, conducts physics simulations on this body while updating the relavent variables tied to this body, and creates an interface to allow other physics shards to interact with this body.