- Home /
Why is there no Rigidbody2D.SweepTest() ?
I'm wondering why the new 2D extensions has no sweep test (Tests if a rigidbody would collide with anything, if it was moved through the scene) like the "normal" Rigidbody has.
Am I missing something trivial here?
To elaborate a bit on my question, I need to find the point of the first collision when moving an object in my scene. All the static functions in Physics2D are discrete and thus doesn't guarantee that the hit points are the "first" ones encountered when moving an object.
Answer by StickFigs · Mar 31, 2014 at 05:13 PM
Most likely it is because 3D physics in Unity use PhysX physics engine while 2D uses Box2D physics engine. Something like a sweep function might not exist by default in the Box2D API or the case could be that Unity simply hasn't exposed the functionality yet.