Forum Discussion
waynecochran
1 year agoProtege
Scale component has no effect on SceneObject stored in an Entity
I am able to create SceneObject's that end up being contained within a specific entity as follows val fooObject = SceneObject(scene, fooMesh, "foo", entity = fooEntity) I am able to call setPos...
- 1 year ago
Hi!
Apologies for the confusion. One thing you need to make sure you do (which is often omitted from our custom SceneObject examples) is attaching it to the SceneObjectSystem. This makes it fully linked in the ECS and other Kotlin systems can grab the SceneObject (like controlling the Visible or Scale components).
systemManager
.findSystem<SceneObjectSystem>()
.addSceneObject(
fooEntity,
CompletableFuture<SceneObject>().apply { complete(fooObject) })We use a future here to allow you to do async loading or waiting on object loads.
Hope this helps!
dav-s
1 year agoMeta Employee
Hi!
Apologies for the confusion. One thing you need to make sure you do (which is often omitted from our custom SceneObject examples) is attaching it to the SceneObjectSystem. This makes it fully linked in the ECS and other Kotlin systems can grab the SceneObject (like controlling the Visible or Scale components).
systemManager
.findSystem<SceneObjectSystem>()
.addSceneObject(
fooEntity,
CompletableFuture<SceneObject>().apply { complete(fooObject) })
We use a future here to allow you to do async loading or waiting on object loads.
Hope this helps!
waynecochran
1 year agoProtege
Ok -- I'll give it a go.
Why does adding Transform(Pose) component work but adding a Scale component does not?
Quick Links
- Horizon Developer Support
- Quest User Forums
- Troubleshooting Forum for problems with a game or app
- Quest Support for problems with your device
Other Meta Support
Related Content
- 3 years ago