#Polygonal OOB Barrier Collision

13 messages · Page 1 of 1 (latest)

chrome yew
strange wren
#

Very cool.

chrome yew
#

Thanks, you don’t understand how much this means to me lol

brittle moss
#

Very cool, gg!
I did something similar in a plugin a few years ago, and it was a pain. Your version looks way better, nice job!

strange wren
#

How did you handle collisions?

tender mason
#

now that im thinking about it this would be really cool for some sorta theoretical boss where it drops these things mid battle that can be used to expand the once-a-small area for more space

chrome yew
#

Awesome, thank you guys!

chrome yew
# strange wren How did you handle collisions?

In simple terms, I did something similar to minecrafts collision by checking if any point inside of the entities bounding box (multiplied by the players movement) would be on the opposite side of the area. But since minecraft uses AABB collision, I had to modify the calculations a bit so I can use OOB.
For the collision part, I first have to compute the perpendicular normal values of each face, then I take the dot product of the movement vector with that normal to measure the force at which the player is colliding with the wall (kind of). Then I just subtract that value from the players movement if its negative.
(To be honest, my friend helped me fix my collision code and I'm not really sure why it works now but it does lmao)

strange wren
#

If it works, it works!

chrome yew
#

Definitely!

ashen garnet
#

interesting

bright hawk
#

thats pretty cool, good job

chrome yew
#

Polygonal OOB Barrier Collision