Forum rules - please read before posting.

Anti-Glide with Direct control

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

  • Welcome to the community, @avatech.

    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.
  • Thanks Chris for the fast response. I think for now I will stick with standard movement then.
  • I've looked into it, but unfortunately it's not possible to have this work in a way that's satisfactory.  I will update the documentation to warn about this limitation.
Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Welcome to the official forum for Adventure Creator.