The '''ColorByOrientationDirection''' component is used to make particles change color depending on their dot product of their orientation to a reference orientation. Dot product essentially means how close in terms of angle is one direction to another. The colors when in-between are lerped.
This component is part of the [[Photon Dust]] system made by [[User:Frooxius|Frooxius]].
== Fields ==
== Fields ==
{{Table ComponentFields
{{Table ComponentFields
|ReferenceDirection|Float3|
|ReferenceDirection|Float3| The direction in local space that is being used as a reference.
|AlignedColor|ColorX|
|AlignedColor|ColorX| The color to use if the particle's orientation is exactly the same direction as <code>ReferenceDirection</code>.
|OrthogonalColor|ColorX|
|OrthogonalColor|ColorX| The color to use if the particle's orientation is exactly 90 degrees to <code>ReferenceDirection</code>. This 90 degrees falls onto any particle direction that is along the surface of a plane facing the same direction as <code>ReferenceDirection</code>.
|OppositeColor|ColorX|
|OppositeColor|ColorX| The color if the particle's orientation is exactly opposite of <code>ReferenceDirection</code>.
}}
== Sync Delegates ==
{{Table ComponentTriggers
}}
}}
== Usage ==
== Usage ==
Attach to a slot, add to the list of modules in a [[Component:ParticleSystem]], and adjust the values to make the desired effect from this component.
== Examples ==
== Examples ==
{{stub}}
== See Also ==
== See Also ==
* [[Component:ParticleSystem]]
* [[Photon Dust]]
[[Category:Components:Rendering:Particle System:Modules{{#translation:}}|Color By Orientation Direction]]
[[Category:Components:Rendering:Particle System:Modules{{#translation:}}|Color By Orientation Direction]]
[[Category:Components{{#translation:}}|Color By Orientation Direction]]
[[Category:Components{{#translation:}}|Color By Orientation Direction]]
[[Category:ComponentStubs]]
Latest revision as of 18:36, 8 February 2025
Component image
Color By Orientation Direction component as seen in the Scene Inspector
The ColorByOrientationDirection component is used to make particles change color depending on their dot product of their orientation to a reference orientation. Dot product essentially means how close in terms of angle is one direction to another. The colors when in-between are lerped.
The color to use if the particle's orientation is exactly 90 degrees to ReferenceDirection. This 90 degrees falls onto any particle direction that is along the surface of a plane facing the same direction as ReferenceDirection.