question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Cannot programatically set <a-camera> rotation in v0.8.0

See original GitHub issue

Description:

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.

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Reactions:1
  • Comments:17 (16 by maintainers)

github_iconTop GitHub Comments

2reactions
dsinnicommented, Nov 13, 2018

It is in the docs for master; I guess it just never made its way over to 0.8.*.

https://aframe.io/docs/master/primitives/a-camera.html#manually-positioning-the-camera

2reactions
donmccurdycommented, Nov 13, 2018

You’ll need to use a wrapper entity — the camera entity itself should not be rotated directly. For example:

<a-entity id=“rig”>
  <a-entity camera look-controls position=“0 1.6 0” />
</a-entity>

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…

Read more comments on GitHub >

github_iconTop Results From Across the Web

Incorrent orientation with initial camera rotation in Aframe 0.8
The problem with this is now your movement and rotation orientation is the wrong plane. You no longer move along the scene's floor,...
Read more >
Setting Main Camera Rotation - Unity Answers
Setting Main Camera Rotation. I can't figure out how to set the rotation of the camera to an exact set of x,y,z values...
Read more >
camera - A-Frame
The camera is commonly paired with controls components that allow input devices to move and rotate the camera. Examples. A camera should usually...
Read more >
top form design peloton
SPIN BIKE ACCESSORIES: The Adjuster allows you to rotate your monitor 360 ... The Pivot for Peloton Bikes | Easily Adjust & Rotate...
Read more >
ThreeDScene - Manim Community v0.17.2
begin_3dillusion_camera_rotation. This method creates a 3D camera rotation illusion around the current camera orientation. ; begin_ambient_camera_rotation. This ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found