Skip to content

Conversation

@PaperPrototype
Copy link
Contributor

@PaperPrototype PaperPrototype commented Oct 16, 2025

// create a ground cube with physics and colliders
var groundGo = Primitives.PhysicsCube("Ground", new Double3(20, 1, 200), isStatic: true);
scene.Add(groundGo);

// you can also create non physics primitives
var regularCube = Primitives.Cube("My cube", Double.One);
scene.Add(regularCube);

// provide your own material
var mat = new Material(Shader.LoadDefault(ShaderDefaults.Standard);
scene.Add(Primitives.Cube("My cube 2", Double.One, mat);

// provide your own mesh
var mesh = Mesh.CreateCube(Double.One);
scene.Add(Primitives.Cube("My cube 3", Double.One, mat, mesh);

Also automatically uses a cached mesh/material if you don't provide one :)

@PaperPrototype PaperPrototype closed this by deleting the head repository Oct 19, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant