public override void DrawContactPoint(ref BM.Vector3 pointOnB, ref BM.Vector3 normalOnB, float distance, int lifeTime, ref BM.Vector3 color) { Gizmos.matrix = Matrix4x4.identity; Gizmos.color = new Color(color.X, color.Y, color.Z); Gizmos.DrawWireSphere(pointOnB.ToUnity(), .2f); }
public override void DrawLine(ref BM.Vector3 from, ref BM.Vector3 to, ref BM.Vector3 fromColor) { Gizmos.matrix = Matrix4x4.identity; Gizmos.color = new Color(fromColor.X, fromColor.Y, fromColor.Z); Gizmos.DrawLine(from.ToUnity(), to.ToUnity()); }
public override void DrawSphere(ref BM.Vector3 p, float radius, ref BM.Vector3 color) { Color c = new Color(color.X, color.Y, color.Z); BUtility.DebugDrawSphere(p.ToUnity(), Quaternion.identity, Vector3.one, radius, c); }
public override void DrawLine(ref BM.Vector3 from, ref BM.Vector3 to, ref BM.Vector3 fromColor) { UnityEngine.Gizmos.color = new UnityEngine.Color(fromColor.X, fromColor.Y, fromColor.Z); UnityEngine.Gizmos.DrawLine(from.ToUnity(), to.ToUnity()); }
public override void DrawContactPoint(ref BM.Vector3 pointOnB, ref BM.Vector3 normalOnB, float distance, int lifeTime, ref BM.Vector3 color) { UnityEngine.Gizmos.color = new UnityEngine.Color(color.X, color.Y, color.Z); UnityEngine.Gizmos.DrawWireSphere(pointOnB.ToUnity(), .2f); }
public override void DrawArc(ref BM.Vector3 center, ref BM.Vector3 normal, ref BM.Vector3 axis, float radiusA, float radiusB, float minAngle, float maxAngle, ref BM.Vector3 color, bool drawSect, float stepDegrees) { UnityEngine.Color col = new UnityEngine.Color(color.X, color.Y, color.Z); BUtility.DebugDrawArc(center.ToUnity(), normal.ToUnity(), axis.ToUnity(), radiusA, radiusB, minAngle, maxAngle, col, drawSect, stepDegrees); }
protected void SetEyeTarget(BulletSharp.Math.Vector3 eye, BulletSharp.Math.Vector3 targ) { UnityEngine.Transform t = UnityEngine.Camera.main.transform; t.position = eye.ToUnity(); t.rotation = UnityEngine.Quaternion.LookRotation((targ - eye).ToUnity().normalized, UnityEngine.Vector3.up); }