• Hey Guest! Ever feel like entering a Game Jam, but the time limit is always too much pressure? We get it... You lead a hectic life and dedicating 3 whole days to make a game just doesn't work for you! So, why not enter the GMC SLOW JAM? Take your time! Kick back and make your game over 4 months! Interested? Then just click here!

GML using "physics_fixture_set_collision_group" to change group while the fixture was already called

Yavga

Member
Hello community,

In my game I am trying to change the collision group of a physics object with "physics_fixture_set_collision_group", now I realize this function probably only works during the creation of a fixture and not while it was already created.

The reason why I need to do this is because in my game the player object consists of 2 objects that overlap each other, one object is for general collisions with walls and the other manages an extra layer of more complex colissions with other physics objects. I want these physics objects to change their collision group the moment their linear velocity reaches a certain treshold so that they temporarily do not collide with player character object B.

Would deleting the fixture and re-creating it on the spot with a new collision group be the most efficient approach or is there a simpler way?

Thanks!
 
Last edited:
Top