Hi everyone:
This is my first time posting on the forums. I've been searching the forums, but can't find any information on what I'm encountering. Right now I have a top-down game that I'm implementing. In the center of the screen is a large static circle. Other circular dynamic shapes move around the screen.
The desired behaviour is that when a dynamic circle hits the static one, it should bounce off with the same energy it had going in.
So, I have the following set up:
Static Circle:
- restitution = 1.0
- friction = 0.0
Dynamic Circles
- restitution = 1.0
- friction = 0.0
The problem I'm having is that the objects don't bounce off each other. When the dynamic circle hits the static circle, it stops and sits there against the static circle. No bounce.
The scale of my world is set up so that 50 pixels = 1 meter. This means my large static circle has a radius of about 1.28m and my small dynamic circles have radii of about 0.3m. My small circles have a density of 1.0. The small circles travel with linear velocity of 0.6m/s, but don't bounce until I get them up over 1m/s.
Now, I've been able to get the dynamic circles to bounce by upping their velocity to 1.1 m/s. I've tried decreasing the density of the dynamic circles, but it doesn't seem to affect things. The only thing that makes things "work" is increasing the velocity.
Does anyone know why my dynamic objects aren't bouncing off my static ones? Two dynamic bodies traveling at exactly the same speed do bounce off each other. Is there a threshold of net difference in velocity that must be crossed in order for the bounce to happen? It looks to me like a velocity <= 1.0m/s won't cause a bounce to happen. Is this a known issue?
Is the best solution to change my scale so that my rate of travel across the screen stays the same, but increases my in-world velocity?
Thanks for any help/suggestions people have.
Owen
Update: I just realised that my suggestion solution of changing the scale won't work, because I need the small circles to bounce off the big one, even if they have a very low velocity.
This is my first time posting on the forums. I've been searching the forums, but can't find any information on what I'm encountering. Right now I have a top-down game that I'm implementing. In the center of the screen is a large static circle. Other circular dynamic shapes move around the screen.
The desired behaviour is that when a dynamic circle hits the static one, it should bounce off with the same energy it had going in.
So, I have the following set up:
Static Circle:
- restitution = 1.0
- friction = 0.0
Dynamic Circles
- restitution = 1.0
- friction = 0.0
The problem I'm having is that the objects don't bounce off each other. When the dynamic circle hits the static circle, it stops and sits there against the static circle. No bounce.
The scale of my world is set up so that 50 pixels = 1 meter. This means my large static circle has a radius of about 1.28m and my small dynamic circles have radii of about 0.3m. My small circles have a density of 1.0. The small circles travel with linear velocity of 0.6m/s, but don't bounce until I get them up over 1m/s.
Now, I've been able to get the dynamic circles to bounce by upping their velocity to 1.1 m/s. I've tried decreasing the density of the dynamic circles, but it doesn't seem to affect things. The only thing that makes things "work" is increasing the velocity.
Does anyone know why my dynamic objects aren't bouncing off my static ones? Two dynamic bodies traveling at exactly the same speed do bounce off each other. Is there a threshold of net difference in velocity that must be crossed in order for the bounce to happen? It looks to me like a velocity <= 1.0m/s won't cause a bounce to happen. Is this a known issue?
Is the best solution to change my scale so that my rate of travel across the screen stays the same, but increases my in-world velocity?
Thanks for any help/suggestions people have.
Owen
Update: I just realised that my suggestion solution of changing the scale won't work, because I need the small circles to bounce off the big one, even if they have a very low velocity.