playMaker

Author Topic: Collision Interactions[SOLVED]  (Read 2798 times)

mweyna

  • Full Member
  • ***
  • Posts: 242
Collision Interactions[SOLVED]
« on: October 21, 2013, 03:51:26 PM »
So this is a general question, in my Unity project I have NPC units that move around a map using Aron's A* package. Each Object on the top level has a Character Controller, Rigidbody, and Box Collider, along with various Playmaker scripts. Right now, I'm using that box collider to trigger various behaviors for the game. However, when the NPCs are navigating around they will occasionally clash with each other where they basically stand in each others way and no one moves. What I want to happen is for my units to walk through each other entirely as if they aren't even there. Does anyone have any ideas how to basically have them have colliders and rigidbodies for the appropriate physics for game systems, but to ignore it for each other so they can path through each other?
« Last Edit: October 22, 2013, 03:23:09 AM by jeanfabre »

Timo

  • Playmaker Newbie
  • *
  • Posts: 11
Re: Collision Interactions
« Reply #1 on: October 21, 2013, 04:41:39 PM »
Have you tried putting a tag on your player, then having the triggers only react to a collision with that tag?


jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15620
  • Official Playmaker Support
Re: Collision Interactions
« Reply #2 on: October 22, 2013, 01:34:25 AM »
Hi,

 For this, you need to setup the collision layers properly so that npc units ignore each others.

http://docs.unity3d.com/Documentation/Components/LayerBasedCollision.html

bye,

 Jean

mweyna

  • Full Member
  • ***
  • Posts: 242
Re: Collision Interactions
« Reply #3 on: October 22, 2013, 02:34:10 AM »
So if I'm understanding this correctly, my NPC units (On Tag "EnemyUnit") should be ignoring each other, right?



Currently, with this setup they're stilling getting stuck on each other. Would this only would on Collider objects or Character Controllers as well?

mweyna

  • Full Member
  • ***
  • Posts: 242
Re: Collision Interactions
« Reply #4 on: October 22, 2013, 02:43:45 AM »
Turns out a subobject had a contrasting layer tag that wasn't being disabled properly. Issue is SOLVED.