Where is the bit of code that moves agents when another agent has collided with them?

104 views
Skip to first unread message

Roger Gibson

unread,
May 15, 2013, 3:53:49 PM5/15/13
to recastna...@googlegroups.com
I am trying to find the bit of code that does this, I have a tank which looks really stupid when a human being is able to bump into it and move it easily,
so I want to disable this mechanism for certain flagged agents. Can you please tell me where to search for this code? Thanks

Mikko Mononen

unread,
May 15, 2013, 7:48:47 PM5/15/13
to recastna...@googlegroups.com
Hi,

It's here:

Something like this could work:
...
}
else
{
const float a = ag->collisionPriority / (ag->collisionPriority+nei->collisionPriority);
pen = (1.0f/dist) * (pen*a) * COLLISION_RESOLVE_FACTOR;
}

"Regular" collision priority is 1.0, which makes both of the agents to avoid just the same. If you make the priority smaller say 0.001, then that agent will avoid less, of the regular ones, but equally in case the other agent is has same priority.


--mikko




On Wed, May 15, 2013 at 12:53 PM, Roger Gibson <mmob...@gmail.com> wrote:
I am trying to find the bit of code that does this, I have a tank which looks really stupid when a human being is able to bump into it and move it easily,
so I want to disable this mechanism for certain flagged agents. Can you please tell me where to search for this code? Thanks

--
 
---
You received this message because you are subscribed to the Google Groups "recastnavigation" group.
To unsubscribe from this group and stop receiving emails from it, send an email to recastnavigati...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

Roger Gibson

unread,
May 16, 2013, 11:14:51 AM5/16/13
to recastna...@googlegroups.com
That worked, thanks a lot :)


--
 
---
You received this message because you are subscribed to a topic in the Google Groups "recastnavigation" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/recastnavigation/OlZfHTcc2Tw/unsubscribe?hl=en.
To unsubscribe from this group and all its topics, send an email to recastnavigati...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages