9 [AddComponentMenu(
"TrueSync/Physics/CapsuleCollider", 0)]
12 [FormerlySerializedAs(
"radius")]
22 return ((CapsuleShape)_body.Shape).Radius;
31 ((CapsuleShape)_body.Shape).Radius = _radius;
36 [FormerlySerializedAs(
"length")]
46 return ((CapsuleShape)_body.Shape).Length;
55 ((CapsuleShape)_body.Shape).Length = _length;
68 Gizmos.DrawWireSphere(Vector3.zero, 1);
70 Gizmos.DrawWireSphere(
new TSVector(0, -
length /
radius + 2 *
radius, 0).ToVector(), 1);
74 return Vector3.one *
radius.AsFloat();
Shape Shape
Shape used by a collider.
override Shape CreateShape()
Create the internal shape used to represent a TSCapsuleCollider.
Collider with a capsule shape.
override void DrawGizmos()
Draws the specific gizmos of concrete collider (for example "Gizmos.DrawWireCube" for a TSBoxCollider...
override Vector3 GetGizmosSize()
Returns the gizmos size.
FP radius
Radius of the capsule.
Abstract collider for 3D shapes.
FP length
Length of the capsule.