Fix move
This commit is contained in:
parent
28b67d79b8
commit
b905fbbde3
@ -219,18 +219,18 @@ public class PlayerController : MonoBehaviour
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (other.GetContact(0).normal == other.transform.forward
|
if (other.GetContact(other.contacts.Length - 1).normal == other.transform.forward
|
||||||
|| other.GetContact(0).normal == -other.transform.forward
|
|| other.GetContact(other.contacts.Length - 1).normal == -other.transform.forward
|
||||||
|| other.GetContact(0).normal == -other.transform.right
|
|| other.GetContact(other.contacts.Length - 1).normal == -other.transform.right
|
||||||
|| other.GetContact(0).normal == other.transform.right
|
|| other.GetContact(other.contacts.Length - 1).normal == other.transform.right
|
||||||
|| (other.GetContact(0).normal != -other.transform.up
|
|| (other.GetContact(other.contacts.Length - 1).normal != -other.transform.up
|
||||||
&& other.GetContact(0).normal != other.transform.up)
|
&& other.GetContact(other.contacts.Length - 1).normal != other.transform.up)
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
this.downDirection = -transform.up;
|
this.downDirection = -transform.up;
|
||||||
saveDirection = -other.GetContact(0).normal;
|
saveDirection = -other.GetContact(other.contacts.Length - 1).normal;
|
||||||
|
|
||||||
// TODO: Handle other PlatformTypes
|
// TODO: Handle other PlatformTypes
|
||||||
Physics.gravity = this.downDirection * 9.81f;
|
Physics.gravity = this.downDirection * 9.81f;
|
||||||
|
Loading…
Reference in New Issue
Block a user