playMaker

Author Topic: Mouse Drag and Move Object!  (Read 1059 times)

rizwanash

  • Junior Playmaker
  • **
  • Posts: 61
Mouse Drag and Move Object!
« on: July 23, 2019, 11:32:59 AM »
Greetings Guys,

I am trying to create some Prototype idea but i am not be able to create a responsive object moving with the Mouse drag.

https://imgur.com/a/xGcCMgG

I am using Get Mouse X and Get Mouse Y then Screen to world point with Translate to move. I dont want to use Set Position because then Cube Jumps to the Mouse position. I want cube starts moving whenever i click on the screen.
How can i achieve that responsive moving object ?

Thanks very much.

Athin

  • Full Member
  • ***
  • Posts: 163
Re: Mouse Drag and Move Object!
« Reply #1 on: July 23, 2019, 08:43:58 PM »
Heya,

I'd try using a mouse pick event action instead and store that V3 to a variable.  Then use that Variable as the target for the cube to move towards. 

You'd have to set up layers for the mouse pick event as well otherwise when the cube reaches the mouse, it you come crashing to the screen as its always targeting the spot on the cube.

Let me know if that helps.

Thanks