Hello, I’m new to unity so forgive my newbish question, anyway i have a character, rigidbody attached with capsule collider, kinematic is turned off and gravity is turned on mass is set to 100 and drag is at 1 but when i move the character over to and edge of terrain (not the end of the terrain object but a “cliff” in the terrain) the character only moves down the y axis at a rate of like .001 per frame. I feel that my rotation script is to blame but i cannot figure out how to fix this problem.
heres my movement script
public class Movement: MonoBehaviour {
public Transform lookingObj;
Plane ground;
void Start () {
}
void Update () {
ground = new Plane(Vector3.up, transform.position);
Ray ray = Camera.main.ScreenPointToRay(Input.mousePosition);
float dist;
if (ground.Raycast(ray, out dist)) {
Vector3 clickPoint = ray.GetPoint(dist);
Vector3 newClickPoint = new Vector3(clickPoint.x, clickPoint.y, clickPoint.z);
lookingObj.LookAt(newClickPoint);
}
}
}
all the other aspects work fine but if i need to rewrite this code to make the gravity work i will do that.
Thanks a bunch!
~ Soos