feat: collision shape is for prop now initialized with physics entity and PHYSICS_LAYER_DEFAULT

This commit is contained in:
Sara 2023-11-26 13:15:07 +01:00
parent 20c5d9dfe1
commit f2159a31a9

View file

@ -13,7 +13,7 @@ Prop* MakeProp(Sprite* sprite, Shape* shape) {
.collisionShape = NULL
};
self->rigidbody = rigidbody_make(Prop_as_Transformable(self));
self->collisionShape = collider_new(self->rigidbody, shape, 0, 0x1);
self->collisionShape = collider_new(Prop_as_PhysicsEntity(self), shape, 0, PHYSICS_LAYER_DEFAULT);
rigidbody_set_static(self->rigidbody, 1);
sprite_set_origin(self->sprite, MakeVector(0.5f, 1.0f));
return self;