Jump to content

Moving an image to a point


developa

Recommended Posts

Posted

Don't bump your forum posts while they're still 7 hours old.

You can use onClientClick to check if a mouse button is pressed down, which allows you to then move around an item on the screen using getCursorPosition in conjunction with onClientRender. To stop moving, you can again use the same onClientClick event to determine when the mouse button is up so you can stop rendering the movement.

Posted (edited)
1 hour ago, myonlake said:

Don't bump your forum posts while they're still 7 hours old.

You can use onClientClick to check if a mouse button is pressed down, which allows you to then move around an item on the screen using getCursorPosition in conjunction with onClientRender. To stop moving, you can again use the same onClientClick event to determine when the mouse button is up so you can stop rendering the movement.

getCursorPosition* screenSizeX

because getCursorPosition returns a value from 0 to 1 :) 

Edited by coNolel
Posted
13 hours ago, coNolel said:

getCursorPosition* screenSizeX

because getCursorPosition returns a value from 0 to 1 :) 

You still have to use getCursorPosition whether it returns a value from 0 to 1. Btw, you can easily recreate the function to have it do the multiplication automatically.

  • Like 1

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...