This fourth part shows how to add basic visual FXs to an object.
As you can see, we can alter most of object's visual properties:
- position
- rotation
- scale (including mirroring/fliping by using negative values)
- color
- alpha
To do so, we define FXs that contain one or more slots. Each slot will affect one property with interpolated values based on linear, sawtooth or sine shaped curves.
We can then define the curves; period, phasis, start/end time, extrema values, amplification (or damping), ...
The interpolations can either be:
- relative to the current object status: and therefore be cumulative with other slots/FXs running concurrently on the same object)
- absolute: giving the exact computed value to our object's property
Values can go out of usual domain bound: for example, colors component values can go out of the [0-255] range when added.
Only the visually applied result will be clamped, not the internal interpolated values. This allows smooth visual FXs even on object having data close to their respective domain boundaries.
All these FXs can be applied at will in the code, as you will see if you go on the tutorial page on the main site.
In the next part, we'll add a spawner to our object, to turn it into an object generator.
---
For more info, please see orx-project.org
Tutorial files (including executable) can be found here: orx-project.org/orx/orx-test-video.zip