Search Unity

  1. Unity 2019.2 is now released.
    Dismiss Notice

To move a 3d game object

Discussion in 'Physics' started by Snapdonedev, Nov 5, 2019.

  1. Snapdonedev

    Snapdonedev

    Joined:
    Jul 24, 2017
    Posts:
    12
    I want to drag a 3d gameobject in its x axis along with mouse. please help me to do this!
     
  2. Olmi

    Olmi

    Joined:
    Nov 29, 2012
    Posts:
    382
    Hi,
    Did you try to do any searches before you came to ask that question? There are many tutorials and writings out there on the topic. Search for "Unity drag object with mouse" and it will bring you examples.
     
    Snapdonedev likes this.
  3. Snapdonedev

    Snapdonedev

    Joined:
    Jul 24, 2017
    Posts:
    12
    Hi sir,
    Actually what I want is, I want to create a 3d slider like UI slider. I checked some mouse dragging codes, but its all about dragging object on its world(x,y,z).