Work in progress
Godot documentation is being updated to reflect the latest changes in version
4.0. Some documentation pages may
still state outdated information. This banner will tell you if you're reading one of such pages.
The contents of this page are up to date. If you can still find outdated information, please open an issue.
Inherits: Shape3D < Resource < RefCounted < Object
Capsule shape resource for 3D collisions.
3D capsule shape to be added as a direct child of a PhysicsBody3D or Area3D using a CollisionShape3D node. In 3D, a capsule is a cylinder shape with hemispheres at both ends.
Performance: Being a primitive collision shape, CapsuleShape3D is fast to check collisions against (though not as fast as SphereShape3D). CapsuleShape3D is cheaper to check collisions against compared to CylinderShape3D.
float height =
The capsule's height.
float radius =
The capsule's radius.