Physics bugs by touching bounce materials

Junior_Djjr

New member
If I create a ball with bouncy material "1.0" and mass "0.1", it works like a ball, but when touching it with character, it instantly teleports 1000 meters.

But this is not the real problem, because if I use mass "1.0", the problem is reduced considerably, but not completely solved and not a good solution.

When the ball is touching any object, it reacts ok, the bounce is not so high or low, but when touching the character, it bounces a lot, and the main thing: even if I'm completely stopped and the ball touches me, at the speed of a turtle, it still bounces a lot!


I'm using this physical material for the collider, body and feet (double checked during runtime, no values changes or something):
imagem_2022-04-24_133315868.png
And the ball:
imagem_2022-04-24_133344334.png

I can't just set the ball to use a mass of a car to avoid this bug (I have cars on my game too btw, so I wanted to use 0.1 mass on the ball), something is wrong here.

Decreasing "bounciness" improves it, but the ball stops bouncing on other objects, not a solution.

I'm using TPS 2.4.4 and Unity 2021.2.
 
I think you need to your characters mass on the UltimateCharacterLocomotion component(under the physics tab) down considerably(it overrides the rigidbody component mass). I think the default is a mass of 100, so if your rocking that, thats why its flying off into BFE.
 
Thanks, it was fixed, for example ball 1.0 and character 3.0.
Luckily for now I only have the ball and a car in the game to adjust their mass.

But it's funny how the character still makes a little jump reaction when the ball touches him (even slowly), like he's getting scared with the ball, it's not a big problem.
 
while mass and weight are not the same thing, one thing to consider is how much mass the player might have compared to the soccer ball. right now your ball has a third of the mass of your player, which doesn't seem quite right to me. But i'm no physics expert, so tweak it till you like it!
 
while mass and weight are not the same thing, one thing to consider is how much mass the player might have compared to the soccer ball. right now your ball has a third of the mass of your player, which doesn't seem quite right to me. But i'm no physics expert, so tweak it till you like it!
In the bug video the character was 10.0 and ball 0.1.
With character 10.0 and ball 0.01 the impact was so strong that it teleported 1000 meters almost instantly.

The values don't make much sense. If anyone wants, test it on your own project to confirm that it's the same as mine, otherwise some other day I'll re-download the demo project to test (I'm working on other things at the moment).

Remembering that this is caused by bounciness, without it the ball touches normally, it's like the character has extremely high bounciness (but it's at 0). Maybe a possible solution is to keep the bouciness low and increase all the bouciness in the world, but it is a terrible solution.
 
One solution might be to not make the characters motor and the ball collide at all. Rather, have a sub collider on the character that does the collision for you, this could even be one the limbs of the character or just in the vicinity of the feet. Maybe even a trigger collider so can have a separate script for more custom control. Anyway, just thoughts, good luck!
 
Top