//for test //public bool isCollision; //public GameObject[] otherCollider; void Start() { //velocity = Vector3.zero; trans = GetComponent <Transform>(); collisionDetector = GetComponentInChildren <CollisionDetector>(); testGround = GetComponentInChildren <TestGround>(); onGround = OnGround(); innerFixedTime = 0; }
public bool OnGround() { TestGround testGround = characterCollider.GetComponent <TestGround>(); bool result = testGround.OnGround(); result = result && !(rigid.velocity.y > 0.1f); return(result); }