Saturday, July 9, 2022
HomeGame DevelopmentHow do I make gentle tile-based collision?

How do I make gentle tile-based collision?


I’ve executed some easy tile primarily based collision: Transfer character, lookup the tiles moved into, and if strong, push them again out. I transfer on every axis independently, as a result of this will get them to eject correctly. My recreation makes use of 2D Sprites, however its physics is 3D, so this consists of the X, Y, and Z axes.

I do not need each tile to really feel like a brick of lead. I need strolling right into a bush to really feel springy. I wish to really feel a little bit of sag when strolling on snow. I need working up a steep slope to really feel more durable than working down a decline. I need for some tiles to bounce you off like trampolines, and for others, to soak up the complete impression so that you simply cease in your tracks.

All of this works very a lot towards the "onerous factor pushes out" design I’ve to this point. It happens to me to that with slopes, it’d to not work to push towards every axis individually. Now that I give it some thought, how do I deal with collisions with multiple tile without delay if they’ve completely different softness properties?

How does one accomplish this type of factor utilizing tiles-based (or in my case, extra precisely, blocked-based) collision?

RELATED ARTICLES

LEAVE A REPLY

Please enter your comment!
Please enter your name here

- Advertisment -
Google search engine

Most Popular

Recent Comments