playMaker

Author Topic: How to make character controllers not bump into each other? [SOLVED]  (Read 3659 times)

amaranth

  • Full Member
  • ***
  • Posts: 172
(2d platformer)

Back for more help. :)

I have a character controllers attached to each of my monsters. Right now, when my monsters touch, they can't go past each other. Is there a way to make character controllers ignore other character controllers by default? (But still have the trigger called... just in case some event needs to happen when the character's pass one another)

[Note: I tried using rigidbodies, but even with colliders, my sprites always fall through solid surfaces. They only seem to recognize solid surfaces when I use character controllers.]
« Last Edit: April 05, 2012, 08:18:25 PM by Alex Chouls »

iHaveReturnd

  • Playmaker Newbie
  • *
  • Posts: 4
Re: How to make character controllers not bump into each other?
« Reply #1 on: April 03, 2012, 10:20:19 PM »
Did you try doing it through triggers instead of collision?

Also if you don't want to use triggers, you can put rigid bodies on objects in the scene to prevent your characters from falling through the floor.  If the floor doesn't have a rigidbody then the character's collider wont be stopped by it if it has a rigidbody on it.
« Last Edit: April 03, 2012, 10:25:17 PM by iHaveReturnd »

amaranth

  • Full Member
  • ***
  • Posts: 172
Re: How to make character controllers not bump into each other?
« Reply #2 on: April 03, 2012, 10:48:36 PM »
I'm using triggers right now.

When I put a rigid body on the walkable area, the entire walkable area falls off the screen. I'm using a mesh for walkable areas.

iHaveReturnd

  • Playmaker Newbie
  • *
  • Posts: 4
Re: How to make character controllers not bump into each other?
« Reply #3 on: April 03, 2012, 11:19:08 PM »
I'm using triggers right now.

When I put a rigid body on the walkable area, the entire walkable area falls off the screen. I'm using a mesh for walkable areas.

Go into the inspector on your floor, under rigidbody uncheck "use gravity" that should fix that problem for you.

amaranth

  • Full Member
  • ***
  • Posts: 172
Re: How to make character controllers not bump into each other? [solved]
« Reply #4 on: April 04, 2012, 06:29:18 PM »
Used this tutorial to get my colliders and rigidbodies set up properly.
Not a valid vimeo URL
Used this answer to put my monsters on a layer in which monsters ignore each other:
http://answers.unity3d.com/questions/234093/excluding-som-physics-collisions.html
« Last Edit: April 04, 2012, 06:32:12 PM by amaranth »

Alex Chouls

  • Administrator
  • Hero Member
  • *****
  • Posts: 4000
  • Official Playmaker Support
    • LinkedIn
Re: How to make character controllers not bump into each other? [SOLVED]
« Reply #5 on: April 05, 2012, 08:18:40 PM »
Thanks for sharing your solution!