Sun

public class Sun

Represents the "sun" - the default directional light in the scene.

The following method will throw UnsupportedOperationException when called: setParent(NodeParent) - Sunlight's parent cannot be changed, it is always the scene.

All other functionality in Node is supported. You can access the position and rotation of the sun, assign a collision shape to the sun, or add children to the sun. Disabling the sun turns off the default directional light.

Public Methods

void
setParent(NodeParent parent)
Changes the parent node of this node.

Inherited Methods

Public Methods

public void setParent (NodeParent parent)

Changes the parent node of this node. If set to null, this node will be detached from its parent. The local position, rotation, and scale of this node will remain the same. Therefore, the world position, rotation, and scale of this node may be different after the parent changes.

The parent may be another Node or a Scene. If it is a scene, then this Node is considered top level. getParent() will return null, and getScene() will return the scene.

Parameters
parent The new parent that this node will be a child of. If null, this node will be detached from its parent.

Send feedback about...