Skip to content

Implementing Star Map Interface

Davor Bokun edited this page Feb 8, 2020 · 3 revisions

A star map actor which implements StarMapInterface is an actor referenced by Planetesimal Component and serves as a source of information about illumination sources. The interface is defined as a generic query for location and color of a named sky object, but Planetesimal Component queries only for an object named "Sun".

Basic Setup

1) Add the Star Map Interface

2) Implement GetObjectParams interface function

And that is all that needs to be done to get the Star Map's basic functionality up and running.

Advanced Setup

Additionally if you want to be able to animate the sky (i.e. the Sun in particular) and want the changes to propagate to the atmospheric scattering system, it is recommended that you setup the event dispatcher as well. It can easily be done in three steps:

1) Add an Event Dispatcher

2) Set the correct callback signature

3) Implement RegisterStarMapEventCallback interface function

Typically all you need is to bind the callback to your event dispatcher, but you can also check the celestial object name like in this example:

With this setup you'll be able to call the event dispatcher with the new updated Sun's color and location, which will broadcast that information throughout the system.