• 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!

GameMaker How to make crates with physics

J

Jscoombs

Guest
Hi everyone,

I'm trying to make a puzzle platformer similar to games like Limbo and Inside. I have crates that can be pushed and are affected by gravity, but how would I go about allowing these crates to rotate when they move? As in, if you push a crate off a ledge, it'll rotate a bit until it hits the floor. I'm not sure how to implement this, any help would be much appreciated. Thanks!
 

Jezla

Member
They should do this on their own, so long as you have not set phy_fixed_rotation to false. Angular damping and density will have an effect as well. If you need a more pronounced effect, you could apply an angular impulse at the moment it falls, or an angular force while it is falling.
 
L

Luke Norton

Guest
Hi everyone,

I'm trying to make a puzzle platformer similar to games like Limbo and Inside. I have crates that can be pushed and are affected by gravity, but how would I go about allowing these crates to rotate when they move? As in, if you push a crate off a ledge, it'll rotate a bit until it hits the floor. I'm not sure how to implement this, any help would be much appreciated. Thanks!
Any chance I could get the code for that crate mate?
 
Top