HeroEngine Forums
Welcome, Guest. Please login or Register for HeroCloud Account.

Author Topic: Calculations/script for skybox/celestials rotation based on latitude/longitude  (Read 1690 times)


  • General Accounts
  • *
  • Posts: 11
  • Xenion
    • View Profile
    • Xenion Development Blog


For my new upcoming project, I am looking for advice, how to tackle problem mentioned in title.

It will be based on waterworld planet with lots of small islands (each simulated via grid of smaller areas), linked with some  sort of teleports. I also want to implement travel via aircraft/ship, probably special instanced area with craft(s) hanging in center, and moving small sea artifacts/objects/clouds around by (separate) script to simulate vehicle movement.

To simulate position on planet, I want to have skybox rotated to simulate correct area position, according to its stored location (lat, lon) on (simulated) surface of planet. Also, it should be correctly calculated for current time of day.

Next, when static locations are tackled, I want to add case for traveling aircrafts, which should also count on movement direction and speed along planetary airspace (and later maybe even orbital/suborbital? - in special "space" area).

Why all this?
I want players to have greater sense of position on planet, just by looking on familiar sky, and even be eventually able to navigate just by looking upwards (visible planets, moons, nearby stars/constellations, etc)...

What do you think? Could it be done? What calculations/data would be needed?

"Any technology advanced enough, is indistinguishable from magic." (A.C.Clarke)

Multiversum & Virtualis Vita Grid & Xenion owner/developer


  • General Accounts
  • *
  • Posts: 1160
  • Never stop learning
    • View Profile

It might be possible to draw pictures of star clusters in a constellation and show them in the sky at night, and move them across the sky. Would just need to set the angle of them, if they are used for steering.

Though the locations and angles might be based on the actual date, if a game were to use a "game day" (which is usually much faster than real time), they might not always line up as real locations, but getting close could be good.
Lead scripter for EO, Repop helper.
HSL Video tutorials: