playMaker

Author Topic: No collision between 2 objects, both using Navmesh[SOLVED]  (Read 11452 times)

Splankton

  • Sr. Member
  • ****
  • Posts: 268
No collision between 2 objects, both using Navmesh[SOLVED]
« on: November 06, 2013, 02:43:32 PM »
Hi,
Can an object that uses a Navmesh collide with other object that also uses a Navmesh?
I've been doing some tests and maybe its something I've done wrong, but I cant get 2 objects that both use a Navmesh, register a collision.  But I can get another object that has no Navmesh to collide and store the result with the other 2 objects. 
I have character controllers on both objects and they can both push each other, but there is no collision detected.  It's strange.  Can someone help?
« Last Edit: November 08, 2013, 12:56:55 AM by jeanfabre »

Yanifska

  • Full Member
  • ***
  • Posts: 163
    • My Portfolio
Re: No collision between 2 objects, both using Navmesh
« Reply #1 on: November 06, 2013, 04:11:37 PM »
I have NavMesh Agents "triggering" one another. This how my enemy can spot the player. I dont check for collisions though. I will try soon though, so I am interested in knowing how is that going on.
What are you trying to do ? can't you use triggers instead of colliders ?
Visit my portfolio: http://www.yanivcahoua.com/

Splankton

  • Sr. Member
  • ****
  • Posts: 268
Re: No collision between 2 objects, both using Navmesh
« Reply #2 on: November 06, 2013, 04:26:12 PM »
I have NavMesh Agents "triggering" one another. This how my enemy can spot the player. I dont check for collisions though. I will try soon though, so I am interested in knowing how is that going on.
What are you trying to do ? can't you use triggers instead of colliders ?

Thanks for your help.  I have 2 enemy players and I want one of them to chase the other and attack. So the way I'm doing it is, using follow player, then checking for a collision, playing the attack animation and basically looping through that.  I'm sure I tried the trigger and it didn't work, but if you have it working between 2 enemies on a navmesh, then I'll give it another go.
By the way, do you know a way how to make one of them avoid the other?  So maybe use a ray, or check the distance?
« Last Edit: November 06, 2013, 04:27:50 PM by Splankton »

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: No collision between 2 objects, both using Navmesh
« Reply #3 on: November 07, 2013, 02:00:26 AM »
Hi,

 Can you double check that your colliders have Rigidbodies? else it will not work.

bye,

 Jean

Splankton

  • Sr. Member
  • ****
  • Posts: 268
Re: No collision between 2 objects, both using Navmesh
« Reply #4 on: November 07, 2013, 10:53:10 AM »
Hi,

 Can you double check that your colliders have Rigidbodies? else it will not work.

bye,

 Jean

Its really strange, because both have Rigidbodies, both have colliders and I've tried triggers and there is still nothing happening.  I can use the player to collide with both enemies, but the enemies do not collide with each other. The only difference is they are both using a Navmesh.  Jean, or someone please help. If 2 agents on a Navmesh can collide, then I'm obviously doing something wrong.  I just dont get how my player can collide with them both?

Splankton

  • Sr. Member
  • ****
  • Posts: 268
Re: No collision between 2 objects, both using Navmesh
« Reply #5 on: November 07, 2013, 01:56:55 PM »
I have it working now.  I just stripped back the enemy models to basic and added my FSM's and Navmesh back one by one.  And now collisions work. For some reason something went wrong.  Dont know what, but its working so I'm happy.