playMaker

Author Topic: (touch input) Dragging objects along a path.  (Read 4165 times)

reedomatic

  • Playmaker Newbie
  • *
  • Posts: 20
(touch input) Dragging objects along a path.
« on: September 12, 2012, 06:07:14 PM »
Does anyone have any ideas how I would drag an object along a pre-defined path, say a circle. I have looked into itween and they have an example called Path-constrained Characters on their site
http://itween.pixelplacement.com/examples.php
The example uses a method called PointOnPath that returns a vector 3 position on a path at the privided percentage. I wanted to know how I would achieve this in playmaker. Any thoughts on the subject would be greatly appreciated.

thanks

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: (touch input) Dragging objects along a path.
« Reply #1 on: September 13, 2012, 08:03:21 AM »
Hi,

 you won't be able to achieve dragging with iTween, that is not the intended use and path constraint works with a percentage value to position object on a path. In our case you need a system that returns the closest point on a path based a given position in space.

Super Spline can do this:
http://www.super-splines.de/documentation/class_spline.html#a7eafeecef951b9613e3baaf73582b457

and I just made a working sample of a touch dragging system. Combining superspline and this sample would be your solution really.

bye,

 Jean

reedomatic

  • Playmaker Newbie
  • *
  • Posts: 20
Re: (touch input) Dragging objects along a path.
« Reply #2 on: September 13, 2012, 09:06:20 AM »
Cool, thx jean. I'll check out super spline.
Marcus

reedomatic

  • Playmaker Newbie
  • *
  • Posts: 20
Re: (touch input) Dragging objects along a path.
« Reply #3 on: September 13, 2012, 03:17:55 PM »
Hey jean, I've downloaded the super splines addon. Have you posted that working example of the touch dragging system you mentioned anywhere? Any examples on this are greatly appreciated, I know you are really busy. Thanks for any help you can give.

marcus

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support

reedomatic

  • Playmaker Newbie
  • *
  • Posts: 20
Re: (touch input) Dragging objects along a path.
« Reply #5 on: September 14, 2012, 09:12:31 AM »
Great, thx jean.