CapsuleShape extends ConvexShape
This class represents a capsule collision shape that is defined around the Y axis.
A capsule shape can be seen as the convex hull of two spheres. The capsule shape is defined by its radius (radius of the two spheres of the capsule) and its height (distance between the centers of the two spheres). This collision shape does not have an explicit object margin distance. The margin is implicitly the radius and height of the shape. Therefore, no need to specify an object margin for a capsule shape.
rp3d.createCapsuleShape(radius, height)
- CapsuleShape:getRadius() number
- CapsuleShape:setRadius(radius)
- CapsuleShape:getHeight() number
- CapsuleShape:setHeight(height)
Return the radius of the capsule.
RETURN
- (number)
Set the radius of the capsule.
Note that you might want to recompute the inertia tensor and center of mass of the body after changing the radius of the collision shape.
PARAMETERS
radius
(number)
Return the height of the capsule.
RETURN
- (number)
Return the height of the capsule.
Note that you might want to recompute the inertia tensor and center of mass of the body after changing the radius of the collision shape.
PARAMETERS
height
(number)