1
\$\begingroup\$

I'm having trouble with my character on a 2.5D platformer. The character get stuck if it collides without reaching the platform's top. Here is a gif showing it: http://i.imgur.com/jmZ6O1K.gifv

Both colliders (platform and character) has a physics material with no friction (or minimum). So I don't know why is this happening.

Character Collider

enter image description here

Physic Material

enter image description here

\$\endgroup\$
  • \$\begingroup\$ can you show the colliders setup on character? \$\endgroup\$ – Hamza Hasan Feb 22 '16 at 10:22
  • \$\begingroup\$ Sure, done. I've upload the collider setup and the physic material setup \$\endgroup\$ – user1423168 Feb 22 '16 at 10:29
  • \$\begingroup\$ Also happening with box collider? instead of capsule? \$\endgroup\$ – Hamza Hasan Feb 22 '16 at 10:36
  • \$\begingroup\$ Yes, also happening... \$\endgroup\$ – user1423168 Feb 22 '16 at 10:39
  • \$\begingroup\$ So it is due to the force that you are applying on going right, is it so? \$\endgroup\$ – Hamza Hasan Feb 22 '16 at 10:40
1
\$\begingroup\$

This is just the way the physics engine works. You don't want to use physics for your character's control. Use the CharacterController instead.

An alternative (but messy) solution is to add a secondary/tertiary collider on the side of each platform and to make it frictionless. This can have unwanted side effects, extra work, and make you feel dirty.

My personal solution is to use Prime31's character controller for 2D, but if you are in 2.5D, I don't think this will work for you.

The reason this is happening is...well, I could make some assumptions, but that's all they would be. So I'll refrain. But imagine if you took a rubber ball and moved it up and towards a wall. It wouldn't just slide up. Anyways, the above solutions should work.

\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.