I am using rb.MovePosition
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class movement : MonoBehaviour
{
public float forceMult = 200f;
private Rigidbody rb;
// Start is called before the first frame update
void Awake()
{
rb = GetComponent<Rigidbody>();
}
// Update is called once per frame
void Update()
{
rb.MovePosition(transform.position + (transform.forward * Time.deltaTime));
}
}
,i am using rb.MovePosition to move my block
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class movement : MonoBehaviour
{
public float forceMult = 200f;
private Rigidbody rb;
// Start is called before the first frame update
void Awake()
{
rb = GetComponent<Rigidbody>();
}
// Update is called once per frame
void Update()
{
rb.MovePosition(transform.position + (transform.forward * Time.deltaTime));
}
}