Implementing a Compass in Unity using the Sci-Fi Soldier HUD pack (Tutorial) by

Поділитися
Вставка

КОМЕНТАРІ • 13

  • @adamcookie26
    @adamcookie26 6 місяців тому +3

    Nice. I hope to see the possibility of pre-built game examples being put for sale to give that extra help to newer game developers or if someone would just wanna mess around with values like seeing say how many zombies their pc can handle on the zombie apocalypse map or how OP they can make a weapon, such and such.

  • @PetMicrowave
    @PetMicrowave 15 днів тому +1

    using UnityEngine;
    public class UICompass : MonoBehaviour
    {
    [SerializeField] Transform viewDirection;
    [SerializeField] RectTransform compassElement;
    [SerializeField] float compassSize; /*NorthXposition - SouthXposition*/

    void LateUpdate()
    {
    Vector3 forwardVector = Vector3.ProjectOnPlane(viewDirection.forward, Vector3.up).normalized;
    float forwardSignedAngle = Vector3.SignedAngle(forwardVector, Vector3.forward, Vector3.up);
    float compassOffset = (forwardSignedAngle / 180) * compassSize;
    compassElement.anchoredPosition = new Vector3(compassOffset, 0);
    }
    }

  • @williamowens6049
    @williamowens6049 6 місяців тому +1

    This was vey helpful. I would like to see adding an objective icon to the HUD compass and its corresponding HUD world space objective icon. Then update the distance label based on the location of the player to the objective.

  • @MaximilianPs
    @MaximilianPs 5 місяців тому

    Nice, what about hit direction when an enemy hits the player? 😁

  • @shirotonbo6315
    @shirotonbo6315 5 місяців тому

    Hey man Godot support when??!!!

  • @williamhiciano394
    @williamhiciano394 4 місяці тому

    using UnityEngine;
    public class compass : MonoBehaviour
    {
    public Transform viewDirection;
    public RectTransform compassElement;
    public float compassSize;
    // Start is called once before the first execution of Update after the MonoBehaviour is created
    private void LateUpdate()
    {
    Vector3 forwardVector = Vector3.ProjectOnPlane(viewDirection.forward, Vector3.up).normalized;
    float forwardSignedAngle = Vector3.SignedAngle(forwardVector, Vector3.forward, Vector3.up);
    float compassOffset = (forwardSignedAngle / 180f) * compassSize;
    compassElement.anchoredPosition = new Vector3(compassOffset, 0);
    }
    }
    you're welcome

  • @shirotonbo6315
    @shirotonbo6315 5 місяців тому

    Also non-humanoid monsters, slimes, bats, spiders etc

  • @TheAsjdj
    @TheAsjdj 15 днів тому

    IS there any plans for a unreal engine pack version?

    • @syntystudios
      @syntystudios  15 днів тому +1

      We're hoping to bring these to Unreal, but don't have anything to share at this stage. Purchasing on the Synty store, we provide a zip with all the sprites that you can use to set up your own UI outside of Unity.

    • @TheAsjdj
      @TheAsjdj 14 днів тому

      @@syntystudios Thanks for the info, i will keep that in mind. Love the work so far

  • @SOUZAA_YT
    @SOUZAA_YT 6 місяців тому

    Por que abandonaram o danger close battle Royale?