wiki.sine.space | sinespace

Scripting/SReflectionProbe

From wiki.sine.space
Revision as of 08:11, 23 December 2020 by Edisonwu (Talk | contribs)

Jump to: navigation, search

This ReflectionProbe class is a script interface for a reflection probe component.

Properties

Center

SVector Center [get, set]

The center of the box area in which reflections will be applied to the objects. Measured in the probe's local space.

probe = Space.Scene.Find("Reflection").ReflectionProbe

probe.Center = Space.Scene.Find(“TargetTransform”).WorldPosition

--set reflection probe center to target transform position.


Size

SVector Size [get, set]

The size of the box area in which reflections will be applied to the objects. Measured in the probe's local space.

probe = Space.Scene.Find("Reflection").ReflectionProbe

probe.Size = Vector.New(50,50,50)

--set cube size of reflection probe to 50.



Members

RenderProbe

void RenderProbe ();

Refreshes the probe's cubemap.

probe = Space.Scene.Find("Reflection").ReflectionProbe

probe.RenderProbe()

--Render scene to this probe's cube map.