camera.orbit ▲ 8

Available from Easy Red 2 2.1.1

Circles around a point looking at it, starting from the side the camera is on. Call cut right before it to choose where it starts.


Return value

Return TypeDescription
voidThis function doesn't return anything

Parameters

ParameterTypeDescription
1voidThe point to circle around and look at
2NumberHorizontal distance of the camera from the point, in meters
3NumberHeight of the camera above the point, in meters
4NumberHow much it turns in total: 360 is a full turn, a negative value turns the other way
5NumberDuration of the shot
6NumberOptional, default 50. Field of view in degrees

Examples

A flag shown to everybody when it is raised

-- In a phase script: the flag appears and the camera circles around it for 10 seconds
local flag = vec3(-1764.1, 114.1, -2021.3)   -- the base of the pole
local top  = vec3(-1764.1, 118.1, -2021.3)   -- the point to look at
er2.createProp("FlagWaving_1", flag, vec3(0, 0, 0), false, function(prop)
    prop:setAlbedo(er2.getFactionFlag(er2.getInvadersFaction()))
end)
camera.orbit(top, 14, 3, 120, 10)            -- 14 m away, 3 m above, a third of a turn

Back to Scripting API