natiny_physics_set_fixed_rotation
void natiny_physics_set_fixed_rotation(NatinyBody body, bool enabled);
Locks or unlocks rotation of a body around all three axes at once. A locked body keeps the orientation it has and cannot be turned by gravity, contacts or impulses.
Parameters
| Name | Type | Description |
|---|---|---|
body |
NatinyBody |
Body handle |
enabled |
bool |
true to lock all three rotation axes; false to release them |
Example
NatinyBody player = natiny_physics_cylinder(0.4f, 1.8f);
natiny_physics_set_fixed_rotation(player, true);