Editor and gameplay cameras
Editor navigation moves your editing view. AeoScript camera calls control the active gameplay camera.
Set the view
Use camera.set_position() and camera.set_target() to place the camera and choose what it looks at. Both accept three numbers or a three-number basket.
camera.set_position([0, 3, 8])
camera.set_target([0, 1, 0])
Use camera.set_orientation(yaw, pitch) when you want to set an orientation directly.
Switch the camera script
You can change the active camera package during Play. Keep the original package name when you intend to restore it.
const old_camera = camera.get_script()
camera.set_script("firstPerson")
// Later, return to the previously selected camera.
camera.set_script(old_camera)
camera.get_script() returns the current package name. camera.set_script(name) selects an installed camera package on the next camera update. The choice applies to this Play session.
Camera collision
physics.resolve_camera_collision(target, desired) returns a position adjusted for collision. Apply the returned position to the camera.
See the Camera API and Physics API.