Playmaker Forum

Bug Reporting => PlayMaker Bug Reporting => Topic started by: justifun on July 26, 2011, 11:00:37 AM

Title: Trigger Collision bug - possibly unity? [RESOLVED]
Post by: justifun on July 26, 2011, 11:00:37 AM
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.
Title: Re: Trigger Collision bug - possibly unity?
Post by: justifun on July 26, 2011, 11:51:52 AM
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