-
Help me understand how a capsule works -- first image is a capsule object, with a radius of 6 and a height of 16: Second image is a sphere object, with a radius of 16: The center of these objects should be identical, yet the player object featured here 'floats' above the ground just a bit as a capsule, as opposed to a sphere. Capsule is created like so: Sphere is created like so: Am I misunderstanding how the size of capsules are measured? It would be cool if there was a diagram in the documentation visualizing how the width/height of a capsule is interpreted. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 3 replies
-
You need to subtract 2x the radius to get the height of the cylinder part of the capsule:
|
Beta Was this translation helpful? Give feedback.
You need to subtract 2x the radius to get the height of the cylinder part of the capsule:
(object->height - object->radius) / 2
->(object->height - 2 * object->radius) / 2