- Home /
Same reaction with different number of objects colliding
Hi!
I have an object (a ball) with a rigidbody because I need that this ball is affected by gravity. After I have different surfaces where the ball can run. The problem I have is that I add a force to up (Y-axis) when a key is pressed but the reaction is not the same if the ball is only colliding with 1 object (for example in a flat surface) that when is colliding with 2 objects (for example when the ball is between 2 tubes). In the 2nd case, the ball ups with less force than in the 1st case.
I would like to obtain the same reaction in both cases. It is that possible?
Thanks a lot!
I've noticed similar behaviors when simulating a car (rigidbody with one box collider + 4 wheel colliders). I can read the forces applied on each wheel collider (WheelHit.force), and when the car touches other colliders, the forces suddenly decrease. Strange.
Answer by spinaljack · Aug 21, 2010 at 01:16 PM
Instead of add force you can alter the rigidbody velocity directly. You can also try reducing friction at the moment you press jump so there's less sticking caused by other objects.
Yes! Altering velocity ins$$anonymous$$d of force works. Thanks!
ahh, the friction was the key! sure, two objects cause double friction... I'll experiment with that.
Your answer
Follow this Question
Related Questions
Creating a SIMPLE car. 1 Answer
Continuously moving rigidbody 2 Answers
Get a bounding sphere for collider/rigidbody? 0 Answers