playMaker

Author Topic: Drag Rigidbody  (Read 5827 times)

sicga123

  • Playmaker Newbie
  • *
  • Posts: 10
Drag Rigidbody
« 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.

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: Drag Rigidbody
« Reply #1 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

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: Drag Rigidbody
« Reply #2 on: March 27, 2012, 11:22:27 AM »

sicga123

  • Playmaker Newbie
  • *
  • Posts: 10
Re: Drag Rigidbody
« Reply #3 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.

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: Drag Rigidbody
« Reply #4 on: March 29, 2012, 10:43:02 AM »
No worries!