Unity3D: Vector3 ist ein mehrdeutiger Verweis?
Hallo,
im Moment bin ich dabei, Unity3D und C# zu lernen. Ich bin einem Tutorial gefolgt, aber an einer Stelle bekomme ich nun eine Fehlermeldung, obwohl im Tutorial da alles funktioniert. Kann mir vielleicht jemand helfen?
Das ist der Code (in Visual Studio):
using System.Collections;
using System.Collections.Generic;
using System.Numerics;
using UnityEngine;
public class CharacterMovement : MonoBehaviour
{
public float speed;
private CharacterController _characterController;
// Start is called before the first frame update
void Start()
{
_characterController = gameObject.GetComponent<CharacterController>();
}
// Update is called once per frame
void Update()
{
_characterController.Move(Movement() * Time.deltaTime);
}
Vector3 Movement()
{
Vector3 moveVector = Vector3.zero;
moveVector += transform.forward * Input.GetAxis("Vertical");
moveVector += transform.right * Input.GetAxis("Horizontal");
return moveVector;
}
}