Up to date
This page is up to date for Godot 4.0
.
If you still find outdated information, please open an issue.
CapsuleShape2D¶
Inherits: Shape2D < Resource < RefCounted < Object
Capsule shape resource for 2D physics.
Description¶
2D capsule shape to be added as a direct child of a PhysicsBody2D or Area2D using a CollisionShape2D node. In 2D, a capsule is a rectangle shape with half-circles at both ends.
Performance: Being a primitive collision shape, CapsuleShape2D is fast to check collisions against (though not as fast as CircleShape2D).
Properties¶
|
||
|
Property Descriptions¶
float height = 30.0
The capsule's height.
float radius = 10.0
The capsule's radius.