← Back to all addons

Pointer Arrow (Direction/Aiming) ↗

Posted by Mr.Titan on Jan 14, 2025 at 5:59 PM

GameplayExperimentalFeature
💡 3 🔥 1

Arrow for indicating the players direction (8 directions).

Import Assets

  • Import RotateMoveDirection.cs to your project.
  • Import the sprite “SPS_CrossHair” to you project. Set the following:
    • Sprite Mode: Multiple
    • Filter Mode: Point (no filter)
    • Pixels Per Unit: 25
    • Compression: None
    • Apply changes
  • Click in Sprite Editor, and create a sprite that will surround for the following (print in attachment):
  • W: 48
  • H: 48
  • Y: 208

Create Pointer

  • Open 0_Hero_Base prefab, create a empty object called PivotCrossHair and attach RotateMoveRirection.cs. Drag the 0_Hero_base to the target of this script. Set Axis to Z.
  • Create a Child object inside PivotCrossHair called CrossHairRenderer. Add a Script Renderer component to it, assign in Sprite option the sprite you imported SPS_CrossHair_0. Ajust the rotation “Z” og the object so that it’s facing the character - by default it should be -90.

Ajust to you liking:

  • Ajust the position of PivotCrossHair to the center of the player. In my case 0.4 position in Y axis did the job.
  • Size of the arrow - I advice you to change the ``Pixel Per Unit` in the texture/sprite. The bigger the number the smaller it gets.

💬 Comments (3)

Gyvr Jan 14, 2025 at 06:00 PM
Niiiice! I’m obsessed with this arrow
❤️ 1
Gyvr Jan 14, 2025 at 06:02 PM
I’ll spam @Gyvr every single day till he adds it to the base asset
😆 2
Mr.Titan Jan 14, 2025 at 06:04 PM
Pointer Arrow (Direction/Aiming) ↗

Want to continue the conversation?