pub const CYLINDER: &str = "type Cylinder { radius: Number = 0.2; height: Number = 1; }";Expand description
A cylinder aligned with local Y.
Radius and height must be positive when a spatial adapter tessellates this geometry. Cylinders currently render but are not RigidBody collision shapes.
§Declaration
type Cylinder { radius: Number = 0.2; height: Number = 1; }§Fields and methods
-
radius: Radius in meters; defaults to 0.2. -
height: Full height in meters along local Y; defaults to 1.
§Create a cylinder
The current spatial adapter renders it along local Y.
let entity = spawn(Cylinder { height: 2 });
print(get[Cylinder](entity).height);