public override bool intersectsAxisAligned(SphereCollider other, out Vector3 normal1, out Vector3 normal2) { throw new NotImplementedException(); }
public override bool intersectsAxisAligned(SphereCollider other, out Vector3 normal1, out Vector3 normal2) { normal1 = new Vector3(); normal2 = new Vector3(); return m_sphere.Intersects(other.m_sphere); }
public override bool intersectsAxisAligned(SphereCollider other, out Vector3 normal1, out Vector3 normal2) { float ret = Vector3.Dot(Normal, other.Position); if (ret - D <= 0) { normal1 = Normal; normal2 = Vector3.Negate(normal1); return true; } normal1 = new Vector3(); normal2 = new Vector3(); return false; }
public override bool intersectsAxisAligned(SphereCollider other, out Vector3 normal1, out Vector3 normal2) { normal1 = normal2 = Vector3.Up; return false; }
public override bool intersectsAxisAligned(SphereCollider other, out Vector3 normal1, out Vector3 normal2) { normal1 = new Vector3(); normal2 = new Vector3(); if (Position.Y + m_height < other.Position.Y - other.Radius) { return false; } if (Position.Y > other.Position.Y + other.Radius) { return false; } Vector3 _p = new Vector3(m_position.X, 0.0f,m_position.Z); Vector3 _p2 = new Vector3(other.Position.X, 0.0f, other.Position.Z); if (Vector3.DistanceSquared(_p,_p2) <= Math.Pow( m_radius + other.Radius,2)) { return true; } return false; }
public abstract bool intersectsAxisAligned(SphereCollider other, out Vector3 normal1, out Vector3 normal2);
public override bool intersectsAxisAligned(SphereCollider other, out Vector3 normal1, out Vector3 normal2) { return other.intersectsAxisAligned(this, out normal2, out normal1); }