Hi, I'm creating a 2D adventure game like Distraint where the movement is directly controlled with keyboard / controller and will only have horizontal axis for movement.
So far, using Direct movement method combined with Player:Constrain actions work fine. However when I try to enable Anti-Glide (Only move when sprite changes?) option in Player script, all the CollisionCube2D in the scene don't work anymore, therefore Player can walk through the boundaries set.
I know that enabling this anti-glide has a side effect of changing the RigidBody2D in Player to Kinematic. However, is there any workaround to make the player boundaries in the scene work? Anyone can show me what is the best alternative to make such collisions?
Thanks!
Comments
It's unfortunate that the lack of collision is a side-effect of this feature, but it's necessary because discrete placement of the character causes conflict with the way Unity's physics/collision system works.
However, I shall investigate to see if a hack of some kind is possible in a way that doesn't cause knock-on issues. Can't promise, but will at least try.