Jump to content

Free Camera Moving in X and Y direction with respective to mouse drag


Vijay Kumar
 Share

Recommended Posts

Hi ,

can anybody please help meI want to move the freecamera in x and y direction according to the mouse drag,

By default freecamera moves in x and z direction when direction keys are pressed.

in the same way :

mouse click and drag right side - camera has to move on right side (X-Axis +)

mouse click and drag Left side - camera has to move on left side (X-Axis -)

mouse click and drag Up side - camera has to move on Up side (Y-Axis +)

mouse click and drag Down side - camera has to move on Down side (Y-Axis -)

and please help me how can i get the updated values of x and y ,when mouse is clicked and getting dragged.

i am new to javascript coding not having good knowledge on keyboard and mouse events .

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

  • Recently Browsing   0 members

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