public static DebugPlace AToB(Pivot pivot, Vector3 a, Vector3 b, Vector3 size, Vector3 up) { var offset = pivot == Pivot.Center ? Vector3.zero : up * size.y * 0.5f; var dir = b - a; return(new DebugPlace(true) { position = a + dir * 0.5f + offset, rotation = Quaternion.LookRotation(Statics.normalize(dir), up), extents = Statics.vec3(0, 0, Statics.length(dir) * 0.5f) + size * 0.5f }); }
public static DebugPlace AToB(Pivot pivot, Vector3 a, Vector3 b, Vector3 up) { return(AToB(pivot, a, b, Statics.vec3(0), Vector3.up)); }
public static DebugPlace AToB(Vector3 a, Vector3 b, float size, Vector3 up) { return(AToB(Pivot.Center, a, b, Statics.vec3(size), up)); }
///----------------------------------------------------------------- public static DebugPlace AToB(Vector3 a, Vector3 b) { return(AToB(Pivot.Center, a, b, Statics.vec3(0), Vector3.up)); }
public static DebugPlace At(Pivot pivot, Vector3 position, Quaternion rotation, float size) { return(At(pivot, position, rotation, Statics.vec3(size))); }
///----------------------------------------------------------------- public static DebugPlace At(Pivot pivot, float size) { return(At(pivot, Vector3.zero, Quaternion.identity, Statics.vec3(size))); }
public static DebugPlace At(Vector3 position, float size) { return(At(Pivot.Center, position, Quaternion.identity, Statics.vec3(size))); }
public static DebugPlace Ray(Pivot pivot, Vector3 position, Vector3 dir, float distance, Vector3 up) { return(Ray(pivot, position, dir, Statics.vec3(distance), up)); }
///----------------------------------------------------------------- public static DebugPlace Ray(Pivot pivot, Vector3 position, float distance) { return(Ray(pivot, position, Vector3.forward, Statics.vec3(distance), Vector3.up)); }
public static DebugPlace Ray(Vector3 position, Vector3 dir, float distance) { return(Ray(Pivot.Center, position, dir, Statics.vec3(distance), Vector3.up)); }
public static DebugPlace AToB(Pivot pivot, Vector3 a, Vector3 b, float size) { return(AToB(pivot, a, b, Statics.vec3(size), Vector3.up)); }