natiny_physics_init

C
int natiny_physics_init(void);

Creates the rigid-body world and starts stepping it once per frame.

Returns

Type Description
int 1 when the world was created, otherwise 0

Example

C
int ok = natiny_physics_init();

Notes

  • Call this after natiny_backend_init, because backend initialization resets all engine state, including the physics world. Repeated calls do nothing and return 1.
  • The world advances in fixed 1/60 s ticks. At most 0.25f s of elapsed time is accumulated per frame.