Mouse Position: Help!

How can you detect mouse position. [ Example: Make a cube follow your mouse.] Thanks for any help!


Thnx (:

In the cube:
[MouseMove (x)] ----to–> [Position (x)]
[MouseMove (y)] ----to–> [Position (y)]
Now can your cube follow the mouse!

Can I still make objects snap to the grid using this method? How would I do that?

I can’t make that :disappointed:
Because MouseMove is with pixels. And I can’t change that in grid.


So each cell in the grid is 32 pixels, so if you divide the mouse x & y by 32, you will get the grid cell. Then just send that into the position property (make sure you check “grid” instead of “pixels”).

Here is an example, hope it helps :smile:

Is there a possibility that when using mousemove you can use the game grid rather than the GUI grid, this would allow my next game to work

So it doesnt get all weird with mousemove

I don’t understand the question, jngthree.

Oops- @grazer,

I meant if theres scrollview on, it doesnt act as if its not moving

@grazer I want to reincorporate this into scrolling, so when you move offscreen it moves a whole screen over

Actually, nevermind, I got it

Now that I think about it, this has never been done before. I’ll show you when I’m done with my project in my other thread

Did I say I can’t do something? Huh…

I can do everything with flowlab