Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

setActiveCamera: call play() and modified camera-set-active event #1502

merged 1 commit into from May 25, 2016


Copy link

@fernandojsg fernandojsg commented May 25, 2016

Fixes #1500: Calls play() when we change the active camera; so it activates the controls attached to the camera (eg: look-controls)

I've also moved the emission of the camera-set-active to the end of the function. In the editor for example I was listening to that event to check if you've added a new camera so I could save it for later but switch automatically to the editor camera. The problem is that the event was emitted and after all the other cameras (including the one I wanted to set in the event) were deactivated.
So by just moving the event to the end you ensure that you've already a consistent state for all the cameras in the scene and you can do whatever you want like, in my case, switching to another default camera.

@dmarcos dmarcos merged commit 4ca3b7c into aframevr:master May 25, 2016
1 check passed
1 check passed
continuous-integration/travis-ci/pr The Travis CI build passed
@fernandojsg fernandojsg deleted the fernandojsg:cameras branch Mar 14, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

2 participants