Kinematic Body Triggers

A place to discuss everything related to Newton Dynamics.

Moderators: Sascha Willems, walaber

Kinematic Body Triggers

Postby jamesm6162 » Tue Mar 29, 2016 9:05 am

Hi

This topic has been discussed before, but unfortunately I have one run into a problem with using Kinematic bodies as triggers. I need to move a kinematic body around and detect collisions with dynamic bodies as well as static bodies.

Right now the dgBroadPhase::TestOverlaping function does not allow kinematic bodies to collide with bodies with no mass (tier5 and tier6 conditions).

What can I do to get these contacts? I don't want the dynamic bodies to react to the kinematic trigger body.
jamesm6162
 
Posts: 49
Joined: Wed Aug 12, 2015 8:50 am

Re: Kinematic Body Triggers

Postby Julio Jerez » Tue Mar 29, 2016 9:27 am

this is by design. if I allowed kinematic bodies collision with dynamics static bodies that cause singularities for the solver, as it will try to solve collision between two static bodies.

why would you want contact form kinematic body and a static dynamics body?
Julio Jerez
Moderator
Moderator
 
Posts: 12426
Joined: Sun Sep 14, 2003 2:18 pm
Location: Los Angeles

Re: Kinematic Body Triggers

Postby jamesm6162 » Wed Mar 30, 2016 2:33 am

Well I use the kinematic body to test for overlap. It's just sensors that should detect whether you are are close to any walls or other objects, like for example in a tunnel. The physical bodies are not touching yet, but I need to know whether these 'ghost' sensors are.
I don't want to use raycasts as there are too many different directions.
jamesm6162
 
Posts: 49
Joined: Wed Aug 12, 2015 8:50 am

Re: Kinematic Body Triggers

Postby Julio Jerez » Wed Mar 30, 2016 8:34 am

I do no remember by I believe that kinematic body with mass, do collide.
In the advance player controller demo there are triggers that detent the player which is a kinematic body with mass. Try that see if it works

The other thing you could do if the above does no work, is that you can use a dynamics body,
and assign a material that in the call back reject all contacts but the signal you first.
That how trigger where made before 3.00
Julio Jerez
Moderator
Moderator
 
Posts: 12426
Joined: Sun Sep 14, 2003 2:18 pm
Location: Los Angeles

Re: Kinematic Body Triggers

Postby Bird » Wed Mar 30, 2016 1:17 pm

I need to move a kinematic body around and detect collisions with dynamic bodies as well as static bodies.


I do that in my project by using

NewtonWorldForEachBodyInAABBDo() to get a list of bodies whose AABB intersect the trigger and then use NewtonCollisionIntersectionTest() in the NewtonWorldForEachBodyInAABBDo callback to determine if the bodies actually intersect or not.

-Bird
Bird
 
Posts: 636
Joined: Tue Nov 22, 2011 1:27 am

Re: Kinematic Body Triggers

Postby jamesm6162 » Fri Apr 01, 2016 4:18 am

Thanks for the suggestions. I will see which works best for me.
jamesm6162
 
Posts: 49
Joined: Wed Aug 12, 2015 8:50 am


Return to General Discussion

Who is online

Users browsing this forum: No registered users and 4 guests

cron