• Sceneform SDK for Android was open sourced and archived (github.com/google-ar/sceneform-android-sdk) with version 1.16.0.
  • This site (developers.google.com/sceneform) serves as the documentation archive for the previous version, Sceneform SDK for Android 1.15.0.
  • Do not use version 1.17.0 of the Sceneform Maven artifacts.
  • The 1.17.1 Maven artifacts can be used. Other than the version, however, the 1.17.1 artifacts are identical to the 1.15.0 artifacts.

Sun

Stay organized with collections Save and categorize content based on your preferences.
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.