Playmaker Forum

PlayMaker Help & Tips => PlayMaker Help => Topic started by: gnetro on August 05, 2013, 10:03:15 AM

Title: Playmaker Collision Detection & 2D toolkit
Post by: gnetro on August 05, 2013, 10:03:15 AM
How does collision work exactly? I'm designing a 2d level and my character will push the box(sprite from 2d toolkit). When im colliding with the box and check the FSM states, it does not collision detection. But when I drop the box over player... the collision detection activates.
Title: Re: Playmaker Collision Detection & 2D toolkit
Post by: sebaslive on August 05, 2013, 11:54:14 AM
The collision has three features, onCollisionEnter, OnCollisionStay and OnCollisionExit so you might have it on Enter right now which is activating the collision when it falls in.

https://hutonggames.fogbugz.com/default.asp?W128
Title: Re: Playmaker Collision Detection & 2D toolkit
Post by: gnetro on August 05, 2013, 12:26:04 PM
I tried to change but it is still the same. I don;t know why the there's only point of the box that detect collision.

Not Colliding
(http://i.imgur.com/9QNbinE.png)

Colliding (this is when the box drop from above and I collide it when this is the angle)
(http://i.imgur.com/8B4VBC4.png)
Title: Re: Playmaker Collision Detection & 2D toolkit
Post by: sebaslive on August 05, 2013, 01:38:40 PM
Okay this may be in the 2d toolkit. I would try taking away the collisions on the sprite itself and attaching the sprite to a square with the renderer turned off. Or playing with the collider on the 2dtoolkit settings.
Title: Re: Playmaker Collision Detection & 2D toolkit
Post by: gnetro on August 05, 2013, 01:45:39 PM
this is also my issue when i'm using uni2d...
Title: Re: Playmaker Collision Detection & 2D toolkit
Post by: sebaslive on August 05, 2013, 07:06:20 PM
You tried switching it all to Uni2D and you still have the same issue? Did you try placing the sprite as a child onto a empty box collider?
Title: Re: Playmaker Collision Detection & 2D toolkit
Post by: gnetro on August 05, 2013, 10:33:33 PM
I did that but the object lost the physics like gravity.
Title: Re: Playmaker Collision Detection & 2D toolkit
Post by: xhidnoda on August 06, 2013, 03:01:47 PM
i use 2dTK and not have a problem with collision.
Maybe your problem is in 2dTK...see the documentation of they. And send here the image how you set.
Title: Re: Playmaker Collision Detection & 2D toolkit
Post by: sebaslive on August 06, 2013, 07:47:48 PM
well it would lose the gravity if the new object doesn't have a rigidbody attached to it so if you add that it will fall again.
Title: Re: Playmaker Collision Detection & 2D toolkit
Post by: xhidnoda on August 06, 2013, 11:19:22 PM
Yes is true.
Wainting the image of your setup so can help you
Title: Re: Playmaker Collision Detection & 2D toolkit
Post by: gnetro on August 07, 2013, 02:22:37 PM
i'll try to post it later i'm a bit busy... on something..