-
-
Notifications
You must be signed in to change notification settings - Fork 36.1k
spotLightHelper: fix duplicate rotation #14738
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
Conversation
| vector.setFromMatrixPosition( this.light.matrixWorld ); | ||
| vector2.setFromMatrixPosition( this.light.target.matrixWorld ); | ||
|
|
||
| this.position.setFromMatrixPosition( this.light.matrixWorld ); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do this, instead:
this.position.copy( vector );
This is a quick and simple fix, I think it can be merged before the discussion on #14658 settles. As a side note you could save a temporary Vector3 variable and a Vector3.copy call by replacing with |
|
Thanks! |
|
Do you still have the issue after #15320? |
|
Nope, thanks! |
When I rotate the parent of spot light, the cone of light helper will rotate twice.
Scene tree
Example
this.matrix = light.matrixWorld;this.cone.lookAt( vector2.sub( vector ) );