playMaker

Author Topic: drag and drop an object, restricted position inside another object  (Read 1379 times)

persabersa

  • Playmaker Newbie
  • *
  • Posts: 9
drag and drop an object, restricted position inside another object
« on: September 25, 2014, 04:12:15 PM »
Hiya,

I've got a playmaker problem I can't seem to figure out the solution to.
I have looked in the forums but haven't found the solution here either, or I haven't looked in the right place.
Anyway..
What I want to achieve:

I have a object X that I want to drag and drop when mouse clicks or touch inside another object Y, but at the same time be restricted where it can be positioned by object Y's shape so I cant go outside object Y, (see attached image). I've tried using mouse pick from the sample scenes but as I go outside the shape of object Y the mouse pick resets its vector3 position data(naturally) so that the object X snaps back to 0,0,0 in the scene.
I can't figure out any clever solution to this so Im reaching out for help.
Im sure its not super complicated but I just can't get my head around it.

thankful for any help

cheers
per