Hi, I am trying out new 2d low level physcis system. I havent found any example involving kinematic + static object interaction with Shape.GetContacts() in fixed update.
Kinematic + dynamic works
Kinematic + static doesnt
Kinematic + kinematic doesnt
My kinematic character body shape is falling influenced with gravity of low level physics, but GetContacts() returns results only with collision with dynamic bodies.
I have created low level physics settings and creating my objects in default world.
My kinematic shape
Thanks.
Works the same as classic 2D physics and 3D physics (PhysX).
See this collision matrix.
To perform collision tests with a kinematic character you will commonly have to resort to raycasts, spherecasts, etc. and then script the resulting behaviour.
Kinematic don’t interact with other Kinematic or Static and we didn’t hack-in the “use full kinematic contacts” in the new Box2D as we did in the old one because it turns out to be pretty expensive and best left in the hands of queries.
If you want contact information, perform a cast or overlap query. You can check what is in overlap and if anything of interest is, you can perform a PhysicsShape.Intersect which will give you a full contact manifold.
Remember, the older physics didn’t support continuous eithe for kinematic vs kinematic/static so you’d only get contact information when they overlapped so you either performed cast queries or overlap queries or both.