Einheit - WASD -Bewegung in Einheit 3D

Post a reply

Smilies
:) :( :oops: :chelo: :roll: :wink: :muza: :sorry: :angel: :read: *x) :clever:
View more smilies

BBCode is ON
[img] is ON
[flash] is OFF
[url] is ON
Smilies are ON

Topic review
   

Expand view Topic review: Einheit - WASD -Bewegung in Einheit 3D

by Anonymous » 05 Apr 2025, 13:10

Hallo nochmal, meine Freunde. Aus der entgegengesetzten Richtung scheinen die Kontrollen umgekehrt zu sein. Auch wenn ich mich mit der Maus umsehe. Das Spiel wird als Ego-Shooter (FPS) angesehen.[SerializeField]
private NavMeshAgent navMeshAgent;

// Start is called before the first frame update
void Start()
{
controller = GetComponent();
}

// Update is called once per frame
void Update()
{
Vector3 direction = new Vector3(Input.GetAxis("Horizontal1"), 0, Input.GetAxis("Vertical1"));
Vector3 velocity = direction * speed;
velocity.y -= gravity;
velocity = transform.TransformDirection(velocity);
controller.Move(direction * Time.deltaTime);
transform.position = navMeshAgent.nextPosition;
}
< /code>
Was soll ich tun? Ich würde Ihre Hilfe wirklich schätzen.

Top