Playmaker Forum

PlayMaker Help & Tips => PlayMaker Help => Topic started by: VectorF22 on October 15, 2014, 11:58:15 AM

Title: Click/Touch Drag an Object with Collision Detection
Post by: VectorF22 on October 15, 2014, 11:58:15 AM
Hi there,


There is a mechanic I'm working on in my game where the player can click/touch an object and drag it around the scene. It's exactly the same mechanic as you would find in Little Big Planet for the PSVita (

I've played around with a few different ways to get the dragging to work such as using the "iTween Move Update" and "Move Towards" actions which work quite well. The only crippling problem is that they don't respond to collision detection too well.... The blocks will go a big crazy while they fight between the "go here" of the action and the "don't go here" of the collision.

Is there a way that anyone knows of that would work well for this mechanic?

I have the "inputTouches" unity pack along with the Playmaker addon for it, but to be honest I can't seem to get that to work very well for this either... I may just be doing it wrong.

Thanks in advance!
Title: Re: Click/Touch Drag an Object with Collision Detection
Post by: jasperPT on October 16, 2014, 05:41:15 AM
Im thinking perhaps create an object when you click, that stays with the mouse. Then move your "Selected" object towards this as the mouse is down.

Then the walls you want the selected object to collide with could have a rigid body on them with frozen transformations so that if your selected object collides they just hit it with whatever physics you want.
Title: Re: Click/Touch Drag an Object with Collision Detection
Post by: VectorF22 on October 20, 2014, 08:40:32 AM
This could work, thanks for the idea Jasper!