- Home /
Simulating bounce?
Hi,
In my games there are spheres and boxes that collide each other and I currently use rigidbodies to achieve this but since I'm moving to mobile and I have like 80+ objects I have to fall back to using triggers and manually handle bounce.
SO how I can manually make a sphere bounce on getting collision with a box trigger?
Thanks.
I was just doing some bouncing, and i suppose you could try my solution: http://answers.unity3d.com/questions/350431/vector3reflect-wrong-direction.html
When the sphere enters to box trigger, check the direction like its done ^ (correct code in answer). Use the rayDir as new direction for your sphere. Just no idea if this is any better for mobile..
Answer by lil_billy · Nov 19, 2012 at 06:16 PM
so you have objects with colliders and rigidbodies
did you set the physics material to bouncey, or rubber
aside from this THERE IS NO MORE efficient method
the physics material accesses the physics system directly whereas the only other option is playing with the rigidbody which is a subsystem of the physics system, meaning it takes additional processing to work
the only thing i can offer is your standard optimization tips -make texture atlases -keep objects simple -use as few textures as possible(going back to make an atlas) -reduce the number of objects bouncing around -there are some settings in the rigidbody you can change to reduce how elaborate the bouncing behaviors are.
For your question, I'm using rigidbodies with bouncy physic material.
Your answer
![](https://koobas.hobune.stream/wayback/20220613084109im_/https://answers.unity.com/themes/thub/images/avi.jpg)
Follow this Question
Related Questions
False collision at the edge of hole when using high gravity value 1 Answer
Two even colliders causing bounce at transition 1 Answer
How do I get a bouncing ball to bounce all around? 0 Answers
I wanna setup something like Kinematic option on sphere but with collision checker. 0 Answers
Prevent sphere object flying up off plane on add force 0 Answers