Hello, I have BIG problem. I have this code:
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class RuszanieSie : MonoBehaviour
{
public float moveSpeed;
// Use this for initialization
void Start()
{
moveSpeed = 8f;
}
// Update is called once per frame
void Update()
{
transform.Translate(moveSpeed * Input.GetAxis("Horizontal") * Time.deltaTime, 0f, moveSpeed * Input.GetAxis("Vertical") * Time.deltaTime);
}
}
it works, but it doesn’t work with Box Collider, I need rigidbody version of this code. I tried doing it but I just can’t do it, walking from code worked but wasn’t working with rotation, please help!