scene.camera gives full control over the viewpoint
set_position(x, y, z) — teleport the camera anywhere in the scenelook_at(mesh) or look_at(x, y, z) — point it at an object or coordinateset_distance(n) — zoom in or out from the current targetfollow(mesh) tracks a moving object every frame — follow(None) stops itscene.ambient.set_brightness(30) — dim for atmosphere (scale 0–100)scene.ambient.set_color('#ff9955') — tint the whole scene warm, cool, or eeriescene.add_light(x, y, z) adds a point light — shines in all directions like a bulb
light.set_color('#4488ff') — colored lights dramatically change the moodlight.set_visible(True) — shows a glowing marker while you’re positioning itaudio.play('/sample_files/laser.wav') — plays a pre-loaded sound fileaudio.play_note('C4', 0.4) — plays a musical note for a set duration
audio.play_note(['C4', 'E4', 'G4'], 1.0)audio.speak('Nice work!') — text-to-speech, with optional voice and languageawait audio.play_async(...) to play background music while a scene runsctx = scene.get_context('2d') — a 2D canvas that floats above the 3D scene
ctx.fill_text('Score: 0', x, y) — draw text at any screen positionctx.fill_rect(x, y, width, height) — draw solid rectangles for panels and barsfill_width = bar_max_width * (value / max_value)mesh.on_collide(other, handler) fires the first time two meshes overlap
scene.run()coin.set_scale(0, 0, 0) — collapses its bounding box tooExplore the “Camera”, “Lighting”, “Sound”, “HUD”, and “Collisions” notebooks
Ask for help if you need it!