So I was wanting to play around with gravity and change the direction using the vector 3 so I did this:
function Start () {
Physics.gravity = new Vector3(1f,0f,1f);
}
And applied it to a cube, stretched out to a plain.
Then I put a sphere on the plain with a ridged body.
When I hit play I noticed two immediate issues.
- The sphere didn’t rotate. It just slid along the plain.
- The sphere continued its course in heading down x and z plains, but didn’t drop when it went off the edge of the plain.
I then tried the same by removing the code and then just tilting the plain and camera and got the results I expected.
What’s going on here?
Is the gravity’s Vector3 not really changing gravity’s direction?
Thanks!