Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Sign In Register

For games that has an object that stops on a flat surfaces

edited April 2019 in How To
If you have a game with an object that stops randomly for no apparent reason, then it may be because the corner of a square hitbox getting stuck on another object.
This isn't too common, but it can happen and it's consistent. Other than changing the hitbox shape, there isn't much around it.

I made a system where it checks to see if the object is in the same spot a frame ago.
If the object is in the same spot, then move it by 1 pixel. This will get the object off of whatever it was stuck on.
This is really helpful for constantly moving objects to keep moving and you can even disable and enable the system.

[Using "this x" with the filter set to "not equal to"]
The timers are set to 0 with the repeat of 1, but I would recommend 1 with a repeat of 1 if you want to control when to stop the object.
The switches can be used to switch or stop the system.

hitbox cache
Sign In or Register to comment.

| make games in your browser
@ 2017, All rights reserved.

Contact us

Get In Touch