playMaker

Author Topic: Drag Object  (Read 1351 times)

Dabora787

  • Playmaker Newbie
  • *
  • Posts: 3
Drag Object
« on: May 23, 2016, 06:53:41 PM »
So I am using Get Mouse X, and Get Mouse y and using Set Position to have a game object be moved by the mouse in 2d space. The issue that I am having is that when i "mouse down" on the game object to initiate the movement. The object moves to 0,0 first  and then when i move the mouse it only moves the object a small portion of what I move the mouse.
« Last Edit: May 23, 2016, 07:04:15 PM by Dabora787 »

joduffy

  • Full Member
  • ***
  • Posts: 121
  • Here to help
    • Online Playmaker Courses
Re: Drag Object
« Reply #1 on: May 23, 2016, 07:11:35 PM »
Whats happening has to do with going from screen co-ordinates that the mouse uses, to world co-ordinates that gameobjects use.

If you install the ecosystem browser, you can do a search for follow mouse action. That should hopefully solve your problem :)

https://hutonggames.fogbugz.com/?W1181
- Jonathan

Online Playmaker Courses available at:
http://courses.jonathanoduffy.com

“I want the world to be a better place because I was here.”  -  Will Smith