mirror of
https://github.com/raysan5/raylib.git
synced 2025-09-14 23:38:15 +00:00
Physac redesign (3/3)
Finally, physics update is handled in main thread using steps to get accuracy in collisions detection instead of moving it to a new thread. Examples are finished as simple and clear as I could. Finally, physac module is MORE simpler than in the first version, calculation everything by the same way for both types of physic objects. I tryed to add rotated physics a couple of times but I didn't get anything good to get a base to improve it. Maybe for the next version... No bugs or strange behaviours found during testing.
This commit is contained in:
@@ -498,8 +498,8 @@ typedef enum { COLLIDER_CIRCLE, COLLIDER_RECTANGLE } ColliderType;
|
||||
|
||||
typedef struct Transform {
|
||||
Vector2 position;
|
||||
float rotation;
|
||||
Vector2 scale;
|
||||
float rotation; // Radians (not used)
|
||||
Vector2 scale; // Just for rectangle physic objects, for circle physic objects use collider radius and keep scale as { 0, 0 }
|
||||
} Transform;
|
||||
|
||||
typedef struct Rigidbody {
|
||||
|
Reference in New Issue
Block a user