aframe: Cannot programatically set rotation in v0.8.0
Description:
- A-Frame Version: 0.8.0
- Platform / Device: Chrome 65.x, Desktop, Windows 10.
- Reproducible Code Snippet or URL: https://glitch.com/edit/#!/wheat-cord
For some reason, using setAttribute
will no longer allow me to programmatically rotate the camera via a component’s init
.
Please view the glitch above, view the non-working example, then uncomment the 0.7.1 CDN version to see it work.
I’ve scoured the API, but can’t see any updates to method signatures or the like for this version.
About this issue
- Original URL
- State: closed
- Created 6 years ago
- Reactions: 1
- Comments: 17 (16 by maintainers)
It is in the docs for
master
; I guess it just never made its way over to0.8.*
.https://aframe.io/docs/master/primitives/a-camera.html#manually-positioning-the-camera
You’ll need to use a wrapper entity — the camera entity itself should not be rotated directly. For example:
Some examples with aframe extras:
https://github.com/donmccurdy/aframe-extras/tree/master/src/controls
I thought we’d documented this somewhere, but it’s notably not there on the
camera
docs so I agree it should be added…I understand the reasons now, however, this doesn’t really help with my particular situation unless I’m missing something in those comments.
For instance, to restore basic camera fencing capability, I now need to figure out some way to merge the ‘camera rig’ angle with the room angle so it makes sense for the user. Unfortunate as I don’t particularly have time to wait for contribs to be updated.
Can I suggest documenting this change so others don’t proceed down the v0.8.x route without understanding the breaking changes for existing projects?