Created
April 3, 2020 02:40
-
-
Save prideout/43b6274468b9d7ce536a5d335e2e71db to your computer and use it in GitHub Desktop.
getting-started-entities
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Reset the root transform, then rotate it around the Z axis. | |
modelViewer.asset?.apply { | |
modelViewer.transformToUnitCube() | |
val rootTransform = this.root.getTransform() | |
val degrees = 20f * seconds.toFloat() | |
val zAxis = Float3(0f, 0f, 1f) | |
this.root.setTransform(rootTransform * rotation(zAxis, degrees)) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment