playMaker

Author Topic: Drag Rigidbody  (Read 4142 times)

sicga123

  • Playmaker Newbie
  • *
  • Posts: 10
    • View Profile
Drag Rigidbody
« on: March 25, 2012, 01: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: 14059
  • Official Playmaker Support
    • View Profile
Re: Drag Rigidbody
« Reply #1 on: March 26, 2012, 10:47:47 PM »
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: 14059
  • Official Playmaker Support
    • View Profile
Re: Drag Rigidbody
« Reply #2 on: March 27, 2012, 08:22:27 AM »

sicga123

  • Playmaker Newbie
  • *
  • Posts: 10
    • View Profile
Re: Drag Rigidbody
« Reply #3 on: March 29, 2012, 06: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: 14059
  • Official Playmaker Support
    • View Profile
Re: Drag Rigidbody
« Reply #4 on: March 29, 2012, 07:43:02 AM »
No worries!