I made a custom gravity, and now I am having trouble making the character to go with it. I need to it to keep the bottom of the prefab pointed at the center of gravity(a Vector3).
Please use C#.
I made a custom gravity, and now I am having trouble making the character to go with it. I need to it to keep the bottom of the prefab pointed at the center of gravity(a Vector3).
Please use C#.
Not sure what you want. Here are a couple of ways:
transform.up = transform.position - centerOfGravity;
Another posibility:
v3 = centerOfGravity - transform.position;
transform.rotation = Quaternion.FromToRotation(-transform.up, v3) * transform.rotation;