This commit is contained in:
haitem
2022-01-28 22:51:06 +01:00
parent 314fc55a0a
commit 3a3cd1fc0d
3 changed files with 314 additions and 1 deletions

View File

@@ -63,7 +63,10 @@ public class PlayerController : MonoBehaviour
if (collision.gameObject.tag == "platform")
{
this.gameObject.transform.rotation = collision.gameObject.transform.rotation;
Physics.gravity = (collision.gameObject.transform.rotation * Vector3.forward);
Vector3 direction = collision.gameObject.transform.rotation * Vector3.down;
Physics.gravity = direction * 9.81f;
Debug.Log(Physics.gravity);
//Physics.gravity = -Physics.gravity;
}