Table of Contents

Start Page » Game Development with the Drag[en]gine » Physics with colliders » Collision shapes

Shapes are used mainly in colliders to define the over all shape of a collider. Shapes can though also be used for Debug Drawers which allows to display physics structures easily. Shapes are analytical geometry and always convex. Combining shapes is always an union. Hence combined shapes can very well be concave but not the individual shapes itself.

Sphere

A sphere is defined by a position and a radius. Ellipsoids are not supported by this shape only true spheres.

Parameter Description Default
PositionThe position of the sphere center.(0,0,0)
RadiusThe length of the radius from the center to the sphere boundary.0.5

Box

A box is defined by a position, orientation and the half length of the extends.

Parameter Description Default
PositionThe position of the box center.(0,0,0)
OrientationThe orientation of the box expressed as a quaternion.(0,0,0,1)
Half ExtendsThe half length of the box main axes or extends.(0.5,0.5,0.5)

Cylinder

A cylinder is defined by a position, orientation, half height and twwo radi. The cylinder is centered around the position and has the major axis point upwards along the Y-Axis. The half height indicates half the length of the cylinder ( from the top face to the bottom face ). The top and bottom radius indicate the radius of the top and bottom face circle. If both are the same the cylinder is a common cylinder otherwise it is a tapered cylinder.

Parameter Description Default
PositionThe position of the cylinder center.(0,0,0)
OrientationThe orientation of the cylinder expressed as a quaternion.(0,0,0,1)
Half HeightHalf the height of the cylinder along the Y-Axis0.5
Top RadiusRadius of the top circle face of the cylinder0.5
Bottom RadiusRadius of the bottom circle face of the cylinder0.5

Capsule

A capsule is defined by a position, orientation, half height and twwo radi. The capsule is centered around the position and has the major axis point upwards along the Y-Axis. The half height indicates half the length of the capsule ( from the top sphere to the bottom sphere ). The top and bottom radius indicate the radius of the top and bottom sphere. If both are the same the capsule is a common capsule otherwise it is a tapered capsule.

Parameter Description Default
PositionThe position of the capsule center.(0,0,0)
OrientationThe orientation of the capsule expressed as a quaternion.(0,0,0,1)
Half HeightHalf the height of the capsule along the Y-Axis0.5
Top RadiusRadius of the top circle face of the capsule0.5
Bottom RadiusRadius of the bottom circle face of the capsule0.5