Valks-Games / TopDownGame

MIT License
2 stars 1 forks source link

Frog sliding into trees #6

Open valkyrienyanko opened 1 year ago

valkyrienyanko commented 1 year ago

Notice how the frogs collision box slides into the trees? This is undesired behavior.

https://github.com/valkyrienyanko/TopDownGame/assets/6277739/fedb39df-f129-4b04-8496-c21546e517be

On a side note, the frog spent way too much time in that small space, it would be nice if it knew where to go. Perhaps instead of casting a random raycast around it, it casts 4 or 8 raycasts around it everytime it wants to slide around. But this is for another issue.

JamesDepret commented 12 months ago

https://docs.godotengine.org/en/4.1/tutorials/physics/physics_introduction.html#move-and-collide

Second code part, Or to bounce off of the colliding object: might work?