diff options
author | chai <chaifix@163.com> | 2020-11-16 08:30:54 +0800 |
---|---|---|
committer | chai <chaifix@163.com> | 2020-11-16 08:30:54 +0800 |
commit | f325841eff10ae492ce6c634d4b07cf058a068c6 (patch) | |
tree | 980d81a4b87d571fcb893fc44f8809af97466bca /Assets/Scripts/Physics/PhysicsPrimitive.cs | |
parent | be3ca8b172f22ce7c4c4316745e0df05de58b069 (diff) |
*state system
Diffstat (limited to 'Assets/Scripts/Physics/PhysicsPrimitive.cs')
-rw-r--r-- | Assets/Scripts/Physics/PhysicsPrimitive.cs | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/Assets/Scripts/Physics/PhysicsPrimitive.cs b/Assets/Scripts/Physics/PhysicsPrimitive.cs index c94aee1a..fde705fd 100644 --- a/Assets/Scripts/Physics/PhysicsPrimitive.cs +++ b/Assets/Scripts/Physics/PhysicsPrimitive.cs @@ -181,6 +181,8 @@ public abstract class PhysicsPrimitive : MonoBehaviour {
get
{
+ if (Mathf.Approximately(Bound.w, PhysicsWorld.Ground))
+ return true;
return Bound.w <= PhysicsWorld.Ground;
}
}
@@ -189,7 +191,8 @@ public abstract class PhysicsPrimitive : MonoBehaviour {
get
{
- return Bound.w > PhysicsWorld.Ground;
+ //return Bound.w > PhysicsWorld.Ground;
+ return !IsOnGround;
}
}
|