playMaker

Author Topic: Trigger Collision bug - possibly unity? [RESOLVED]  (Read 7288 times)

justifun

  • 1.2 Beta
  • Sr. Member
  • *
  • Posts: 280
Trigger Collision bug - possibly unity? [RESOLVED]
« on: July 26, 2011, 02:00:37 PM »
I'm getting some strange collision issues with playmaker and unity and im not sure which is causing the problem.

Here's the setup.

Capsule (Controller Simple Move/Get Axis Vector actions)
|->Cube parented to it like and positioned in front of it (set as a trigger and rigid body)

on the cube is a FSM with 2 states

State 1:
Trigger event with a gotostate2 event "on trigger enter"
collision tag "enemy"

State2:
Trigger event with a gotostate1 event "on trigger exit"
collision tag "enemy"

The strange part is, once this cube collides with an object tagged enemy it switches to state 2, but then keeps switching back and forth every frame or something.  This does NOT occur if you unparent the cube from the capsule and let it float it space.  Only once parented under the capsule.

I've tried playing with the rigid body of the enemy choosing various "collision detection" settings but still the same result.

So why does parenting it under the capsule that's being moved cause this strange behaviour?  Is this a unity bug? or playmaker?

Any suggestions for a work around?

What i'd like to do is use this invisible box in front of the character to determine if the enemy is in front of them within striking distance.
« Last Edit: November 05, 2011, 06:13:03 PM by alexchouls »

justifun

  • 1.2 Beta
  • Sr. Member
  • *
  • Posts: 280
Re: Trigger Collision bug - possibly unity?
« Reply #1 on: July 26, 2011, 02:51:52 PM »
Hrm, ok i think i figured it out, but im not sure why. 

I removed the rigid body on the character and its working now.

i have no idea why though.  Is there some faulty math going on using the combonation of a controller simple move and a rigid body?

is there a rigid body built into the character motor? and by adding a second rigid body, it might be causing this?

anywhoo, its working again