We've now seen both static and dynamic physics objects in GameMaker, but what happens when we want the best of both worlds? Let's take a look at how to create a platform that can move and affect other objects via collisions but is immune to said collisions.
Again, we'll be using our existing physics environment, but this time, we'll need a new object. Create a sprite that is 128 px wide by 32 px high and assign it to an object called
obj_platform. Also, create another object called
obj_kinematicParent but don't give it a sprite. Add collision events to
obj_dynamicParent, and itself. Make sure that there is a comment in each event.
obj_platform, add a Create event.