Skip to content

loherangrin/addons.o3de.day-night-cycle

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Day/Night Cycle Gem

This extension (gem) for O3DE (Open 3D Engine) provides a component to manage the change between day and night in scenes. It allows to:

  • Define the day duration using a human-readable format for time values (e.g Sunrise and Sunset times).
  • Move the sun position according to the scene time.
  • Work synchronously with the main time component of the scene (provided by Date & Time gem), or independently from it.
DayNightCycle_Example.mp4

Examples

A sample project showing the basic usage of this gem is located under /examples/ directory. Three different variants are available:

  • examples/cpp: implementation using C++ (native code).
  • examples/lua: implementation using Lua (scripting).
  • examples/script-canvas: implementation using ScriptCanvas (visual scripting).

You can inspect each project variant adding it to your O3DE Project Manager (at least version 2111.2 is required). Or, if you are using O3Tanks, you can even run it directly as a standalone application:

cd <gem_dir>/examples/<implementation>
o3tanks build client
o3tanks run client

Install

This gem requires Date & Time Gem to handle time data values. Please refer to its documentation to install the required gem before proceding further.

Please choose one of the following options to install this gem in your O3DE projects:

Automatic installation

Following steps require to install O3Tanks, a version manager for O3DE to streamline the development workflow. You can find additional information at its main repository.

o3tanks install gem https://github.com/loherangrin/addons.o3de.day-night-cycle.git --as <any_name>
o3tanks add gem <any_name> --project <project_path>

Manual installation

  1. Clone this repository into a directory of your choice:
git clone https://github.com/loherangrin/addons.o3de.day-night-cycle.git <gem_dir>
  1. Register the gem to your engine, following the steps that are described in Registering Gems to a Project page of the official O3DE documentation.
  2. Activate the gem in your project, following the steps that are described in Adding and Removing Gems in a Project. You will have to look for Day/Night Cycle as gem name in the Catalog list.

Contribute

We are happy to receive your feeback! Please open an issue in our tracker if you would like to propose a new feature or you have encountered any error.

To get involved in the development of o3tanks, please refer to our contribution guidelines.

License

Day/Night Cycle Gem is licensed under the Apache License, version 2.0. Please see LICENSE and NOTICE files for further details.

About

An external module (gem) for O3DE to switch between day and night

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published