A demo of a collision algorythm intended for use in Super Smashy Maker, as well as my own future games. It aligns the lower-center of the object with the surface they're walking on, without losing the ability to hang off the edge of surfaces, while also using trigonometric collisions for horizontal and upwards collisions, providing high accuracy and better control with a low performance cost compared to built-in physics. It's designed to suit as many collider configurations as possible, so it's perfect for level editors where the terrain layout can't be predicted by the developer.

The actual physics of the player are seperate from the collision detection and are interchangable. Future plans include adjustable gravity direction and player size.

(Press Q to teleport the player to the mouse cursor)

Download

Download
TomatoCollision.cs 23 kB

Comments

Log in with itch.io to leave a comment.

when i went to test if i could get it to work the ceiling collisions didn't work. i'm relatively new to C# so i like to see if i can get complex systems working. 

moving kinda feels icy, hard to stand in a specific spot.

this was a demo for collision detection, not movement mechanics, so the movement in the demo is VERY basic

fair enough👍

pretty cool! :)