Up to date

This page is up to date for Godot 4.2. If you still find outdated information, please open an issue.

CapsuleShape3D

继承: Shape3D < Resource < RefCounted < Object

用于物理碰撞的 3D 胶囊形状。

描述

3D 胶囊形状,旨在用于物理学。通常用于为 CollisionShape3D 提供形状。

性能:CapsuleShape3D 可以快速检查碰撞。比 CylinderShape3D 快,但比 SphereShape3DBoxShape3D 慢。

教程

属性

float

height

2.0

float

radius

0.5


属性说明

float height = 2.0

  • void set_height ( float value )

  • float get_height ( )

胶囊体的高度。


float radius = 0.5

  • void set_radius ( float value )

  • float get_radius ( )

胶囊体的半径。