as you can see the evil Twin (called 3d) has somthing that i need in my 2D World.
How do i get that?
More Detail:
On the Left we have 2 Boxes with 0 gravity, 0 drag or ANYTHING that could stop them.
Both have a Rigidbody and BoxCollider.
On the Right we have also 2 Boxes , again with NOTHING that could stop them.
Both have a Rigidbody2D and Box2DCollider.
Then the Play button is pressed, with the results above:
3D World applies “Force” between those 3dBoxes.
2D World applies “Translate” between those 2dBoxes, and stops… WHY`?
More Context:
In my Top-Down Space game, you can destroy enemies with bullets. Destroyed enemies leave a wreckage behind. This wreckage should be sensible to anything that collides with it and drift in a realistic manner.
I would love some help, maybe its somthing small that i am overlooking in the settings?
Greets Mike
I guess it’s just how Box2D handles penetration (same behavior on mine). My guess is that penetration depth does not factor into collision impulse, and only relative velocity plays a role in this.
I’m pretty sure you’ll still get realistic enough drifting. Try moving a third box through the 2 stationary ones and watch them float away. In your case, you could either have the projectiles themselves blow the ships’ pieces away, or use a script to apply force to the parts when the ships explode.
This is the way the 2D physics engine works, another example can be seen here Forward to 3 minutes 39 seconds and watch what happens around 4 minutes 6 seconds, the UFO is pushed outside the box (it has a body2d itself), but it stays at the edge of the box once outside, physics 2D doesn’t continue to push it further out.
So basically, another proof this is how it is being handled in 2D. As to the reason why, no clue I am afraid.
You might want to apply force to your object, that might help