Cylinder

Procedural cylinder (tube) mesh, with configurable start offset and direction.

Cylinder

Cylinder(resolution=8, radius=0.5, start=0, height=1, direction=(0,1,0), mode='triangle', **kwargs)

Located in ursina/models/procedural/cylinder.py

Overview

Generates a cylindrical surface (tube):

  • resolution: segments around
  • radius, height: dimensions
  • start: vertical offset
  • direction: axis vector
  • mode: 'triangle' or 'line'

Example

from ursina import *

app = Ursina()
Entity(model=Cylinder(6, start=-0.5), color=color.hsv(60,1,1,0.3))
EditorCamera(rotation_speed=200, panning_speed=200)
app.run()
Back to API Reference