natiny_physics_set_type

C
void natiny_physics_set_type(NatinyBody body, uint32_t type);

Changes what the solver is allowed to do with a body.

Parameters

Name Type Description
body NatinyBody Body handle
type uint32_t NATINY_BODY_DYNAMIC, NATINY_BODY_STATIC or NATINY_BODY_KINEMATIC

Constants

Name Description
NATINY_BODY_DYNAMIC Has mass, moved by forces and collisions
NATINY_BODY_STATIC Not moved by forces, velocity or collisions
NATINY_BODY_KINEMATIC Moved by the game; pushes dynamic bodies without being pushed back

Example

C
natiny_physics_set_type(wall, NATINY_BODY_STATIC);