❔ How to make character jmup

using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class PlayerMovement : MonoBehaviour
{
[SerializeField] private float _speed = 1f;

void Start()
{

}

void Update()
{
var direction = new Vector3(Input.GetAxis("Horizontal"), 0, Input.GetAxis("Vertical"));
transform.Translate(direction * _speed * Time.deltaTime);

}

}
using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class PlayerMovement : MonoBehaviour
{
[SerializeField] private float _speed = 1f;

void Start()
{

}

void Update()
{
var direction = new Vector3(Input.GetAxis("Horizontal"), 0, Input.GetAxis("Vertical"));
transform.Translate(direction * _speed * Time.deltaTime);

}

}
how to make character jump?
3 Replies
TheRanger
TheRanger2y ago
do u know how transform.Translate works?
augh
augh2y ago
Well this is probably the wrong approach to making a player controller. I'd suggest using a velocity vector. There are plenty of great tutorials out there.
Accord
Accord2y ago
Was this issue resolved? If so, run /close - otherwise I will mark this as stale and this post will be archived until there is new activity.
Want results from more Discord servers?
Add your server