Interracting with 2 physics engines in the same Application

Please don't post Bullet support questions here, use the above forums instead.
Post Reply
SinisterMephisto
Posts: 20
Joined: Tue Sep 01, 2009 4:19 pm

Interracting with 2 physics engines in the same Application

Post by SinisterMephisto »

I have the misfortune of trying this in Unity3d

At the moment I have 0 access to the PhysX innards, only my objects are available to me.
The only interactions they make are collisions only.

When i set my body as a "pseudo kinematic" (Frozen position and rotations) and move it about each frame (set position)

I get stable "inaccurate" collision response (from the other object) with no velocity taken into account a la collision with static object (ground).

When i set velocities for my object after moving them (The velocities have no effect. They are meant to inform other PhysX objects during collision) the collision response (Handled by physX & unity3d) of the physX objects are quiet explosive.

Basically I am wondering if there is a "Cheap" way to trick PhysX maybe have some corrective impulse at reduced framerate.
Everything but the relative velocity would be wrong.

Just asking before I try it.
Last edited by SinisterMephisto on Thu May 23, 2013 12:15 pm, edited 2 times in total.
SinisterMephisto
Posts: 20
Joined: Tue Sep 01, 2009 4:19 pm

Re: Interracting with 2 physics engines in the same Applicat

Post by SinisterMephisto »

I probably should further explain the constraints.

Unity3D has no collision callbacks
Unity3D's collision even for no rigidbodies wont return contact points.
I do not want to call a shape-cast/ray-cast every frame a collision is triggered to generate contact points because I feel this might not be a good way to spend CPU (But it is my last resort). Also the engine is already doing this regardless so i might as well use its existing results.

Unity3D's contact,trigger and collision Events are also slightly late and severe penetrations occur if you choose to wait for it. You can compensate for this by having bigger colliers to trigger the casting. Which means more casting.
Post Reply