Celestia/Celx Scripting/CELX Lua Methods/CEL command lookback

< Celestia < Celx Scripting < CELX Lua Methods

lookback

lookback { }

Change the current camera view by 180 degrees (like a rear-view mirror).

The command has no arguments.


CELX equivalent:

Based on the observer:rotate() method.

up_v = celestia:newvector(0,1,0)
lookback = celestia:newrotation(up_v, math.pi)
obs = celestia:getobserver()
obs:rotate(lookback)

Summarized:

up_v = celestia:newvector(0,1,0)
lookback = celestia:newrotation(up_v, math.pi)
obs = celestia:getobserver()
obs:rotate(lookback)


Example:
See the above CELX equivalent also as the CELX example for CEL: lookback { }.

CEL:

lookback { }

CELX with the observer:rotate() method:

up_v = celestia:newvector(0,1,0)
lookback = celestia:newrotation(up_v, math.pi)
obs = celestia:getobserver()
obs:rotate(lookback)


Back to CEL command index

This article is issued from Wikibooks. The text is licensed under Creative Commons - Attribution - Sharealike. Additional terms may apply for the media files.