Playmaker Forum

PlayMaker Help & Tips => PlayMaker Help => Topic started by: sicga123 on March 25, 2012, 04:34:17 PM

Title: Drag Rigidbody
Post by: sicga123 on March 25, 2012, 04:34:17 PM
I was wondering whether anyone had created an action to drag a rigidbody. I have a game where I would like to drag a rigidbody (either attached to a 2D toolkit sprite) or a 3D object. Ideally I would like it to knock other sprites or objects out the way as it is moved. Tried for a couple of days without much luck. The drag example in playmaker doesn't deal with rigidbodies and I'm having some problems with the logic in the FSM. Basically I would like to click on the object (there would be several such objects) to be dragged individually and then release it on a button up event.

I would greatly appreciate any assistance.
Title: Re: Drag Rigidbody
Post by: jeanfabre on March 27, 2012, 01:47:47 AM
Hi,

 I have a pending post on the same topic, that I meant to make a sample for it.

Unity has a script for this in the standard asset DragRigidbody.js And I need to port this into playmaker.

Basically you attach a spring to your gameObject, and you control the other end of the srping with your mouse position.

This becomes a very popular request on this forum, so will post on the wiki a sample made in playmaker.

Say tune :) ( sorry some hard core deadline in the way :) )

Bye,

 Jean
Title: Re: Drag Rigidbody
Post by: jeanfabre on March 27, 2012, 11:22:27 AM
Ok, Here we go :)

http://hutonggames.com/playmakerforum/index.php?topic=1286.0 (http://hutonggames.com/playmakerforum/index.php?topic=1286.0)

Bye,

Jean
Title: Re: Drag Rigidbody
Post by: sicga123 on March 29, 2012, 09:08:41 AM
Thanks, Jean, I really appreciate your help. Sorry for the delayed response, never got notified it had even been answered.
Title: Re: Drag Rigidbody
Post by: jeanfabre on March 29, 2012, 10:43:02 AM
No worries!