playMaker

Author Topic: Move Object with Mouse [SOLVED]  (Read 1549 times)

mTruly

  • Junior Playmaker
  • **
  • Posts: 98
Move Object with Mouse [SOLVED]
« on: April 07, 2016, 10:27:20 AM »
I've read a bunch of threads on this but am too much of a newbie to understand what I need to do.

Imagine a cube sitting at 0,0,0.  I want to move the cube when the middle mouse button is dragged but only in the Y axis... and only in a certain range... say +10 on Y to -10 on Y.

I have a Get Mouse Y which puts the mouse screen position into a float variable.  I have a Set Position which uses the variable to position the cube only in the Y axis.  When I drag the m-mouse button... the cube moves up and down in Y... but will not go into negative Y.

Not sure what actions I need to use to make this happen the easiest way.

Thanks for any ideas!


« Last Edit: April 07, 2016, 01:40:42 PM by mTruly »

mTruly

  • Junior Playmaker
  • **
  • Posts: 98
Re: Move Object with Mouse
« Reply #1 on: April 07, 2016, 01:39:50 PM »
I was able to make it work... thank you Playmaker!