hi my problem is simple
even tough my useGravity is set to true and my rigid body has also gravity enable
is not working, the same goes for transform. position my camera doesnt follow the object I am moving
// Update is called once per frame
void Update () {
rb.useGravity = true;
if (Input.GetKey("d"));
{
rb.AddForce(0, 0, forwardForce * Time.deltaTime);
}
if (Input.GetKey("a"))
{
rb.AddForce(sidewaysForce *Time.deltaTime, 0, 0);
}
if (Input.GetKey("s"))
{
rb.AddForce(-sidewaysForce * Time.deltaTime, 0 , 0);
}
}
}
using UnityEngine;
public class FollowPlayer : MonoBehaviour {
public Transform Player;
// Use this for initialization
void Start () {
}
// Update is called once per frame
void Update () {
Debug.Log(Player.position);
transform.position = Player.position;
}
}