Fixed capsule debug draw
Height is distance between centers
This commit is contained in:
parent
2197a3bcb9
commit
2147c2c34b
|
@ -378,7 +378,7 @@ namespace SHADE
|
||||||
SHQuaternion circleOrientation = SHQuaternion::FromEuler(SHVec3(SHMath::DegreesToRadians(90.0), 0.0f, 0.0f)) * rotation;
|
SHQuaternion circleOrientation = SHQuaternion::FromEuler(SHVec3(SHMath::DegreesToRadians(90.0), 0.0f, 0.0f)) * rotation;
|
||||||
|
|
||||||
// Compute top and bottom of the cylinder
|
// Compute top and bottom of the cylinder
|
||||||
const SHVec3 HALF_UP = LOCAL_UP * (height * 0.5f - radius);
|
const SHVec3 HALF_UP = LOCAL_UP * (height * 0.5f);
|
||||||
const SHVec3 TOP_POS = position + HALF_UP;
|
const SHVec3 TOP_POS = position + HALF_UP;
|
||||||
const SHVec3 BOT_POS = position - HALF_UP;
|
const SHVec3 BOT_POS = position - HALF_UP;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue