Command Palette

Search for a command to run...

Hectal
Back to the lesson: Topic 16.3 — Colliders and Joints
3D Web · Example 2 of 2

Two wheels on hinges, and a motor

Pick the simplest collider that fits: balls, cuboids, cylinders and convex hulls are fast and solid; a triangle mesh is exact but hollow. Friction and restitution are set per collider and combined per contact (averaged by default). Joints hold bodies together: a revolute joint is a hinge, and its motor drives a wheel.

Change the code and press Run (Ctrl+Enter). Predict what will happen first, then break it on purpose and read what changes. Your edits are saved and match the lesson page.

Ready for more? This phase has 4 hands-on exercises with automatic checks.

Practice questions

Write the code in the editor, run it, then open the model answer to compare.

01

Make the crates in Topic 16.1's scene less slippery and bouncier.

02

Add a front-wheel motor to the second example too, and compare the speed after 2 s.

Explain it without notes

01

Which collider shapes would you use for the bike, the track and a crate, and why?

02

Explain how friction and restitution are combined, with numbers.

Two wheels on hinges, and a motor

Console

(nothing was printed)

Expected console output

settled: frame at x -0.00 y 0.80
after 2 s of motor: frame at x 5.53 | speed 2.80 m/s | ideal ω·r = 2.80 m/s