Aframe: Auto Rotate camera in A-Frame

Created on 1 Jun 2017  路  6Comments  路  Source: aframevr/aframe

I am try to rotate the 360 image using
it's working fine
But inside 360 image I am using some of the icons and labels while I try to rotate the image the icons and labels are going out of the environment

Any one tell me that How to rotate the camera ? Instead of rotating an Image

Thanks in advance

Most helpful comment

<a-entity>
  <a-animation></a-animation>
  <a-camera></a-camera>
</a-entity>

Again, Kumaresh. Please ask on Stack Overflow, provide code to show that you tried, and show what you tried.

All 6 comments

Add id="camera" to your <a-camera> element and do:

document.getElementById('camera').setAttribute('rotation', '0 45 0');

Hello nwoltman
The above code is not working it just changes the image direction to "y" the camera is not get rotating
I need an rotation like this https://livetour.istaging.com/57ecd104816dfa005668e914 and as well I need floor plan also how to do
Thanks in advance

@Kumaresh-Rajalingam Yes the code I gave you is an example of how to rotate the camera to a specific rotation. I didn't realize you were asking how to do a rotation animation. Try following the animations guide and use an <a-animation> inside your <a-camera>.

There's also an A-Frame Slack channel where you can get more help: https://aframevr-slack.herokuapp.com/
There's always Stack Overflow as well.

@nwoltman have you check the above link that I sent? I need an rotation like this

<a-entity>
  <a-animation></a-animation>
  <a-camera></a-camera>
</a-entity>

Again, Kumaresh. Please ask on Stack Overflow, provide code to show that you tried, and show what you tried.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

greggman picture greggman  路  4Comments

ghost picture ghost  路  3Comments

impronunciable picture impronunciable  路  5Comments

ngokevin picture ngokevin  路  5Comments

AdrienPoupa picture AdrienPoupa  路  6Comments