Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Dismiss Notice

Question 3D axis arrows in actual game

Discussion in 'Scripting' started by Gamefal1820, Aug 25, 2023.

  1. Gamefal1820

    Gamefal1820

    Joined:
    Sep 23, 2021
    Posts:
    4
    Unity has axis arrows for X, Y and Z that we can use them for moving gameobject in editor.
    So, how we can make these axis arrows for gameobject but in actual game?
     
  2. Kurt-Dekker

    Kurt-Dekker

    Joined:
    Mar 16, 2013
    Posts:
    36,563
    You could just make one out of Unity primitives and put it in, five minutes quick and dirty. :)

    If you feel more energetic, make or find a 3D arrow and stick it in 3 times colored. OpenGameArt might have some too, or just arrows in general.

    EDIT: I found one I made a while ago, attached.

    Screen Shot 2023-08-25 at 6.35.04 AM.png
     

    Attached Files:

  3. Gamefal1820

    Gamefal1820

    Joined:
    Sep 23, 2021
    Posts:
    4
    I mean I need 3D axis arrows can functionally work like dragging X axis up or down
     
    Kurt-Dekker likes this.
  4. kdgalla

    kdgalla

    Joined:
    Mar 15, 2013
    Posts:
    4,326
    These are only in the Unity editor. They don't exist at all in your build, so you have to make your own.

    You can put a collider on each of the three arrows to detect mouse clicks. There are lots of tutorials about making mouse-dragging objects in Unity. You could just do the same thing except limited to whichever axis the player is clicking.
     
    Chubzdoomer likes this.