Run Through Slope in a large velocity -- Only large velocity

contac

Member
I'm making a lock-step game, and In some cases i must move character a large distance per frame.(a little large, not very huge)
And it cause my character run through the slope.

Do you have any suggestion with me?

1621256911735.png
 
Hm are you able to reproduce this in the demo scene at all? I tested with the same acceleration values and slopes seem fine. One thing I've found that's helped with slopes in Unity in general is using a zero-friction physic material on the character's collider, so you could try applying one to the CapsuleCollider.
 
Hm are you able to reproduce this in the demo scene at all? I tested with the same acceleration values and slopes seem fine. One thing I've found that's helped with slopes in Unity in general is using a zero-friction physic material on the character's collider, so you could try applying one to the CapsuleCollider.
I read the code of moving the capsuleCollider,
and i find the problem is on 【CheckGround】 Function.

First of all, i don't need 【ComputePenetration】,because it should happen when only wrong position inited.
So i simply the code, and i find that the function【ClosestPointOnCapsule】used in 【CheckGround】,
it mapped the point on the end-ball of capsule to the end of the capsule.
But when i move fast, it doesn't do this. This cause that i can't climb the slop.

1.png

I tried to fix this by this code, it works but i think it may cause other problems.. Waiting for your reply, i'd like to get some advice from you, thanks~

1635935653756.png
 
I would strongly advise against messing around with any of the movement/collision detection code. It can easily end up causing other unexpected issues elsewhere.

Have you been able to reproduce it in the demo scene? As I said, I couldn't see the issue happening when I tried using the same values. There are a few other physics-related settings within Unity that you can try modifying:

- Add a zero-friction physics material to the slope collider (with "friction combine" mode set to "minimum")
- Try setting the "collision detection" mode on the Rigidbody to "Continuous"
- If your slope is using a plane/quad collider, try using a boxcollider instead to increase its width
- Increase the "Default Max Depenetration Velocity" value in your project's Physics settings
 
I would strongly advise against messing around with any of the movement/collision detection code. It can easily end up causing other unexpected issues elsewhere.

Have you been able to reproduce it in the demo scene? As I said, I couldn't see the issue happening when I tried using the same values. There are a few other physics-related settings within Unity that you can try modifying:

- Add a zero-friction physics material to the slope collider (with "friction combine" mode set to "minimum")
- Try setting the "collision detection" mode on the Rigidbody to "Continuous"
- If your slope is using a plane/quad collider, try using a boxcollider instead to increase its width
- Increase the "Default Max Depenetration Velocity" value in your project's Physics settings
2.png3.png4.png

Also need to set the updatemode to FixedUpdate, it may calculate less so that it can have a chance to show the problem.
 
I would strongly advise against messing around with any of the movement/collision detection code. It can easily end up causing other unexpected issues elsewhere.

Have you been able to reproduce it in the demo scene? As I said, I couldn't see the issue happening when I tried using the same values. There are a few other physics-related settings within Unity that you can try modifying:

- Add a zero-friction physics material to the slope collider (with "friction combine" mode set to "minimum")
- Try setting the "collision detection" mode on the Rigidbody to "Continuous"
- If your slope is using a plane/quad collider, try using a boxcollider instead to increase its width
- Increase the "Default Max Depenetration Velocity" value in your project's Physics settings
It's a pity that i don't use any unity physics's collision, i just use the ray-detection and capsule-sweep-detection just as this project do...
 
Yeah I tested in the demo with those exact settings and it seems to work fine for me. The character just runs up the slope. Are you on the latest version of UCC? Have you tried my other suggestions?
 
Yeah I tested in the demo with those exact settings and it seems to work fine for me. The character just runs up the slope. Are you on the latest version of UCC? Have you tried my other suggestions?
The latest version doesn't appear this problem. Thank you for reply~
 
Top