CapsuleShape QML Type

Defines a pill-like shape. More...

Import Statement: import QtQuick3D.Physics
Since: Qt 6.4
Inherits:

CollisionShape

Properties

Detailed Description

This type defines a capsule shape. This is a cylinder with a hemisphere at each end. The origin is at the center of the capsule. The capsule is specified by diameter, which determines the diameter of the cylinder and the hemispheres; and height, which determines the height of the cylinder.

Note: When using scaling transformations with this shape, the x component will be used to scale the height and the y component will be used to scale the diameter. The cylinder will always be perfectly circular even if the scaling transformation is non-uniform.

See also Shapes and Bodies overview documentation.

Property Documentation

diameter : float

This property defines the diameter of the capsule

Default value: 100


height : float

This property defines the height of the capsule

Default value: 100


© 2024 The Qt Company Ltd. Documentation contributions included herein are the copyrights of their respective owners. The documentation provided herein is licensed under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation. Qt and respective logos are trademarks of The Qt Company Ltd. in Finland and/or other countries worldwide. All other trademarks are property of their respective owners.