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

bug: needs a way to supply followLight DirectionalLight object #119

Open
elisherer opened this issue Oct 23, 2024 · 3 comments
Open

bug: needs a way to supply followLight DirectionalLight object #119

elisherer opened this issue Oct 23, 2024 · 3 comments

Comments

@elisherer
Copy link

this code

      dirLight = characterModelRef.current.parent.parent.children.find(

assumes the directionalLight is at a specific level, Ecctrl might be lower in the components tree.
Can we supply a ref somehow, through context maybe?

@ErdongChen-Andrew
Copy link
Member

I know the followLight setup wasn’t ideal 😅. It’s better to give ecctrl a ref and control the light to follow its position manually.

@elisherer
Copy link
Author

@ErdongChen-Andrew do you want a PR?

@ErdongChen-Andrew
Copy link
Member

For the followLight? I don’t think it’s necessary, users can easily get the ecctrl position and have more flexibility to adjust the light themselves. I plan to remove this feature in a future version, but thanks for asking.

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

2 participants