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

Spot light position bug #1624

Closed
FrederickDesimpel opened this issue Jul 10, 2016 · 8 comments
Closed

Spot light position bug #1624

FrederickDesimpel opened this issue Jul 10, 2016 · 8 comments

Comments

@FrederickDesimpel
Copy link
Contributor

FrederickDesimpel commented Jul 10, 2016

the cone of a spot light seems to be a unit higher then it's origin :
http://www.frederickdesimpel.be/test/webVR/Aframe/spot-bug.jpg

@FrederickDesimpel FrederickDesimpel changed the title Spot light position and lookat bug Spot light position bug Jul 10, 2016
@FrederickDesimpel
Copy link
Contributor Author

not sure if it is the spotlight itself that is in the wrong place or the editor's cone visualisation.

@msimpson
Copy link
Contributor

Is this related to #1621?

@FrederickDesimpel
Copy link
Contributor Author

no this is just about the position of the object

@fernandojsg
Copy link
Member

@FrederickDesimpel can I have the example scene that you're using in your screenshot to test it on the editor?

@FrederickDesimpel
Copy link
Contributor Author

@fernandojsg i don't seem to have it around anymore... should be easy to recreate, it was just a spotlight and a sphere to check it's position...

can't seem to get into the editor anymore for the moment, so i can't recreate it now.

@FrederickDesimpel
Copy link
Contributor Author

FrederickDesimpel commented Jul 16, 2016

@fernandojsg i have a scene that clearly shows the problem:

http://www.frederickdesimpel.be/test/webVR/Aframe/test11-spot-showbug-spotPos.html

the yellow line is from the light aframe element position, the white line is from the position of the light itself attached to the elements object3D. it is exactly one unit too high.

@FrederickDesimpel
Copy link
Contributor Author

FrederickDesimpel commented Aug 11, 2016

Made a temporary fix here. The functionality to the end user should be as expected. The real cause can be hunted upon later...

FrederickDesimpel added a commit to FrederickDesimpel/aframe that referenced this issue Aug 11, 2016
Fixed a bug with spotlight angle only being set with degtoRad when light is created, further updates were set in radians.

Made the getlight function a method inside the component, so i could set this.defaultTarget.
Moved the spotlight specific setup of that defaultTarget inside the setlight method.
It is added to the light elements object3D group to enable spotlight orientation.

Added a temporary fix for issue aframevr#1624, otherwise i couldn't get spotlight orientation correct.

there's a suite of unit test for light target, as wel as for both bugfixes.
ngokevin pushed a commit that referenced this issue Aug 11, 2016
…a bug with spotlight position. (#1728)

* squash of 11 commits

Fixed a bug with spotlight angle only being set with degtoRad when light is created, further updates were set in radians.

Made the getlight function a method inside the component, so i could set this.defaultTarget.
Moved the spotlight specific setup of that defaultTarget inside the setlight method.
It is added to the light elements object3D group to enable spotlight orientation.

Added a temporary fix for issue #1624, otherwise i couldn't get spotlight orientation correct.

there's a suite of unit test for light target, as wel as for both bugfixes.

* updated unit test light suite

* Docs: added target property to spotlight component and entity sections
@ngokevin
Copy link
Member

fixed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants