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

No files matched your search

+4 -1
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;
}