Collision Problems With UFPS Controller

Epicnez

New member
Hello.

Sorry to post multiple questions under one title but I think these are all related to player collisions in some way and I didn't want to spam the forums.

I'll list these problems from least to most important.

1.) When holding the jump button after jumping into the ceiling the player sticks to it until starting to fall.

2.) Sometimes when jumping into the ceiling the player camera clips through it.

3.) Sometimes when falling, while standing against a wall, the player will get stuck up against it instead of continuing to fall.

4.) At lower frame rates especially, rotating/walking around a smaller sphere (with the align to ground ability) is very jittery and far more difficult to jump off of.

5.) Very uncommon, but sometimes when walking over a 90 degree edge the player will rotate over it onto it and start walking on the wall despite having a slope limit of 75 degrees. (I'm using the align to ground ability heavily.)

Sorry if these questions don't relate to each other or collisions in general but I'm not sure where to start with them.
I can clarify anything or provide more details if it helps.

Thank you.
 
Last edited:
1.) When holding the jump button after jumping into the ceiling the player sticks to it until starting to fall.
I am not able to reproduce this. In the demo scene when I jump and hit the ceiling the character starts to fall immediately.

2.) Sometimes when jumping into the ceiling the player camera clips through it.
You can adjust the camera collision radius which should prevent this from happening.

3.) Sometimes when falling, while standing against a wall, the player will get stuck up against it instead of continuing to fall.
Can you tell me how to reproduce it within the demo scene?

4.) At lower frame rates especially, rotating/walking around a smaller sphere (with the align to ground ability) is very jittery and far more difficult to jump off of.
Are you using one of the align to gravity abilities? Can you tell me how to reproduce it in the demo scene?

5.) Very uncommon, but sometimes when walking over a 90 degree edge the player will rotate over it onto it and start walking on the wall despite having a slope limit of 75 degrees. (I'm using the align to ground ability heavily.)
The align to ground ability will fire a raycast down and align the character to the object beneath it. If you want to limit what it is aligned to you could subclass the ability.
 
Hello, thank you for your response.

1.) I just found this is caused by the force hold property under the jump ability. I have it set to 0.2 and force damping hold set to 0.8.

2.) If I find a certain position and camera rotation where jumping into the ceiling clips through it, it happens no matter what the camera collision radius is. Could this be related to having a very wide camera field of view? I have it set to 90. Also I thought it might be related to the force hold applying force while hitting the ceiling as mentioned above

3.) I couldn't recreate this in the demo scene, I tried falling while pressing up a flat wall and could not recreate the issue.

However while trying I ran into another problem I forgot about which was that sometimes when falling, the player will fall halfway through the floor and get stuck. I achieved this in the demo scene by setting the force hold to a higher number under the jump ability, and jumping up and down against a flat wall and one time I randomly fell through half way through the ground, I tried to recreate it the same way but could not do it again. This has happened several times while playing through my own level though.

4.) Yes I'm using align to ground. In the demo scene, in the dynamic gravity room, change the size of the planet to 0.25, and increase the strength of the player jump and walk around on it. For me it's kind of jittery walking around on it and jumping off of it. If you set the application target framerate to a lower number it makes it more jittery.

5.) I'm building rooms with ProBuilder so the rooms are just one object. The problem is that rarely, when walking over a 90 degree edge the player will rotate to it and start walking on it as if they had walked over a convex edge.

Thank you for your help.
 
1.) I just found this is caused by the force hold property under the jump ability. I have it set to 0.2 and force damping hold set to 0.8.
Ah, that makes sense. When the character jumps into the ceiling and a force is still being applied then the jump ability doesn't stop and keeps applying a force.

2.) If I find a certain position and camera rotation where jumping into the ceiling clips through it, it happens no matter what the camera collision radius is. Could this be related to having a very wide camera field of view? I have it set to 90. Also I thought it might be related to the force hold applying force while hitting the ceiling as mentioned above
A 90 degrees field of view is likely the cause as more gets shown for that. One way to solve it would be to position the camera lower. It doesn't sound like the camera position is actually colliding with any objects, it's just that with a wide field of view you are able to see it clip.

However while trying I ran into another problem I forgot about which was that sometimes when falling, the player will fall halfway through the floor and get stuck. I achieved this in the demo scene by setting the force hold to a higher number under the jump ability, and jumping up and down against a flat wall and one time I randomly fell through half way through the ground, I tried to recreate it the same way but could not do it again. This has happened several times while playing through my own level though.
Can you create a video of it?

4.) Yes I'm using align to ground. In the demo scene, in the dynamic gravity room, change the size of the planet to 0.25, and increase the strength of the player jump and walk around on it. For me it's kind of jittery walking around on it and jumping off of it. If you set the application target framerate to a lower number it makes it more jittery.
You could try changing the speed at which the character rotates.
 
Player getting stuck on walls while falling:

This seems to happen consistently only in this area of the level. I could probably work around it but if you have any suggestions let me know.


Player sticking to ceiling (fixed):

Any tips to improve this, maybe preventing force from being applied while touching the ceiling? Not a huge problem though.

Camera clipping through the ceiling (fixed):

Lower the camera position solved this, thank you.

Player turning over 90 degree edge:

I'll try to capture this on video, it's relatively uncommon. The closest I could get was on this wheel when running towards it in a certain way the player will consistently rotate to a direction they shouldn't.


Player falling through the floor:

It's relatively uncommon so I couldn't get it quite the way it happens normally, just falling through the floor, but I got it happening when falling into a cube-like object, but it happens the same way as in the video, the player falls into the floor (or in this case an object) then gets stuck and can't move except for looking around.


Jittery movement on sphere platform:

I'll try adjusting the rotation some more, maybe tie it to the framerate somehow? Certain rotation speeds seem to work best for certain framerates.

Thank you for your help!
 
Thanks, can you send me that scene so I can take a closer look? You can send it to support@opsive.com.
I exported the scene as a package but there were over 100 dependencies and it won't include them all. Importing this package into a scene in a separate project caused a large amount of errors. The project file size is pretty large (about 18GB) so I'm not sure how else to send the scene.
 
Apologies if this is related to old/solved issues, but have you tried applying a physics material to your character's capsule collider with friction = 0 (and collision mode set to "min")? I've found that to help a lot with Unity's collision, especially with stuff like getting caught on walls like you mentioned previously.
 
Apologies if this is related to old/solved issues, but have you tried applying a physics material to your character's capsule collider with friction = 0 (and collision mode set to "min")? I've found that to help a lot with Unity's collision, especially with stuff like getting caught on walls like you mentioned previously.
Hello, thank you for the suggestion. Unfortunately the physics material did not work, I also tried assigning it to the floor and wall of the room along with the player. Thank you again.
 
Can you take the models that are causing the problem and create a new scene with just those objects? This should then be independent of any scripts and you can create a basic character allowing you to send a small project.
 
Can you take the models that are causing the problem and create a new scene with just those objects? This should then be independent of any scripts and you can create a basic character allowing you to send a small project.
I'll do that, thank you.

Edit: I found out that a specific area where the player would sometimes rotate over a 90 degree edge was caused by them being close to (and running off of) a slant that they should be able to rotate on while walking over the edge. I would think this means the raycast to determine the player rotation was going through the floor at a certain angle or somehow not hitting the floor and hitting this slant instead. I can easily work around this by not positioning slants behind 90 degree edges. This problem still occurs on the wheels though.
 
Last edited:
Most collision problems seemed to not be related to UFPS, and the align to ground ability does not take into account slope limit.
 
Falling through floor was actually caused by the player update location under the motor settings on the Ultimate Character Locomotion script being set to Update() when it should have been set to FixedUpdate().
 
Top