public override void Construct() { Capsule = new ExtCapsule(transform.position, transform.rotation, transform.lossyScale, 0.5f, 2f); }
public static GravityOverrideLineTopDown DrawCapsule(ExtCapsule capsule, GravityOverrideLineTopDown capsuleGravity, Color color, out bool hasChanged) { float sizeLine = capsule.LocalScale.magnitude / 25; float sizePoint = capsule.LocalScale.magnitude / 20; hasChanged = false; bool changed = hasChanged; capsuleGravity.Trunk = ExtGravityOverrideEditor.DrawLineTrunk(capsuleGravity.Trunk, capsule.P1, capsule.P2, color, sizeLine, out changed); hasChanged = (changed) ? true : hasChanged; capsuleGravity.Top = ExtGravityOverrideEditor.DrawPoint(capsuleGravity.Top, capsule.P1, color, sizePoint, out changed); hasChanged = (changed) ? true : hasChanged; capsuleGravity.Bottom = ExtGravityOverrideEditor.DrawPoint(capsuleGravity.Bottom, capsule.P2, color, sizePoint, out changed); hasChanged = (changed) ? true : hasChanged; return(capsuleGravity); }