The also known as coefficient of restitution of this actor, represents the amount of energy preserved after collision or the bounciness. If 1, it is 100% bouncy, 0 it completely absorbs.
Can this body sleep, by default bodies do not sleep
Collision type for the rigidbody physics simulation, by default CollisionType.PreventCollision
Optionally list any component types this component depends on If the owner entity does not have these components, new components will be added to the entity
Only components with zero-arg constructors are supported as automatic component dependencies
The coefficient of friction on this actor
The collision group for the body's colliders, by default body colliders collide with everything
Degrees of freedom to limit
The amount of mass the body has
Gets/sets the acceleration of the actor from the last frame. This does not include the global acc Physics.acc.
The velocity of the actor last frame (vx, vy) in pixels/second
Amount of "motion" the body has before sleeping. If below Physics.sleepEpsilon it goes to "sleep"
Type of this component, must be a unique type among component types in you game.
Should use global gravity Physics.gravity in it's physics simulation, default is true
The current acceleration vector (ax, ay) of the actor in pixels/second/second. An acceleration pointing down such as (0, 100) may be useful to simulate a gravitational effect.
The current acceleration vector (ax, ay) of the actor in pixels/second/second. An acceleration pointing down such as (0, 100) may be useful to simulate a gravitational effect.
Returns if the owner is active
Get the angular velocity in radians/second
Set the angular velocity in radians/second
Get the moment of inertia from the ColliderComponent
Get the inverse moment of inertial from the ColliderComponent. If CollisionType.Fixed this is 0, meaning "infinite" mass
The inverse mass (1/mass) of the body. If CollisionType.Fixed this is 0, meaning "infinite" mass
The position of the actor last frame (x, y) in pixels
Gets/sets the rotation of the body from the last frame.
The scale of the actor last frame
The (x, y) position of the actor this will be in the middle of the actor if the Actor.anchor is set to (0.5, 0.5) which is default. If you want the (x, y) position to be the top left of the actor specify an anchor of (0, 0).
The (x, y) position of the actor this will be in the middle of the actor if the Actor.anchor is set to (0.5, 0.5) which is default. If you want the (x, y) position to be the top left of the actor specify an anchor of (0, 0).
The rotation of the body in radians
The rotation of the body in radians
Whether this body is sleeping or not
The current torque applied to the actor
The current torque applied to the actor
Apply only linear impulse to the body
Sets the old versions of pos, vel, acc, and scale.
Clones any properties on this component, if that property value has a clone()
method it will be called
Optional callback called when a component is added to an entity
Optional callback called when a component is added to an entity
Set the sleep state of the body
Update body's BodyComponent.sleepMotion for the purpose of sleeping
Body describes all the physical properties pos, vel, acc, rotation, angular velocity for the purpose of of physics simulation.