Skip to content

Latest commit

 

History

History
80 lines (56 loc) · 3.06 KB

environment_objects.rst

File metadata and controls

80 lines (56 loc) · 3.06 KB

Environment Objects

Scene Object Leftwards Movement

In order to convey the effect that whale is swimming towards right whilst its relative x-position to the screen boundary maintains, functions need to be defined to let the various objects such as corel, wave and clouds scroll to the left at different speeds which also engaged a parallel effect between further and closer objects.

WaveEntity Object Inspector Screenshot

WaveEntity Object Inspector Screenshot

Note

In order to create a constant flow movement of the wave, 3 identical wave sprites with the same width as the screen width have been put in a row. When the center of the WaveEntity which is the container of 3 wave sprites scrolls to one screen width to the left of the original center, reset the X position of the Wave entity to it's original starting position thus create a constance flowing effect.

Tip

An oscillating algorithm has been implemented on the wave entity to mimic the dynamic of real waves. 3 layers of wave entities fluctuate according to various periods