5 minutes
Lesson 1 gave you a lit, top-down arena with three purple walls. But there was nothing to do in it yet. A shooter needs something you can steer. This lesson drops a ship onto the floor and gives you the controls. Press W, and the capsule slides north. Aiming and firing come next lesson. Right now the whole job is move.
Add the Player to the scene
You add one new entity, Player, next to the lights, camera, floor, and cover from Lesson 1. Paste it into your scene JSON exactly as the arena ships it:
The ship is a glowing cyan capsule. There is no GLB and no rigging. It is a MeshPrimitive that casts a shadow onto the floor. The tags: ["player"] line does an important job. The ArcCamera you placed in Lesson 1 has target: "Player". So the moment this entity exists, the overhead view locks onto it and follows.
TwinStickShooter has about a dozen settings, but only three do anything today: speed, arenaHalfWidth, and arenaHalfDepth. The fire settings, like fireRate, bulletSpeed, and muzzleFlash, sit unused on the component until Lesson 3 wires up the arrow keys. Health comes along too. Nothing touches it until enemies arrive in Lessons 6 and 8.
Continue reading
Unlock the Full Course
Every lesson, the runnable examples, and the finished build — yours to keep.