pmndrs / ecctrl

🕹️ A floating rigibody character controller
MIT License
530 stars 63 forks source link

Keep camera in primary scene #60

Open cyango opened 4 months ago

cyango commented 4 months ago

I suggest having a way to keep the camera in the primary scene. As discussed here: https://discord.com/channels/740090768164651008/1162488856088690879/1239947711696863316

There is a issue where Ecctrl takes out the camera, therefore we cannot use const { camera } = useThree(); camera.position and trust the position is the same as it's moving with Ecctrl. This also breaks the whole workflow on pmndrs/uikit as it depends on using the camera in the scene.

ErdongChen-Andrew commented 4 months ago

We need the pivot and followCam to keep the camera functioning correctly. Maybe I can try adding the pivot to the scene to see if it works with UIKit. 🤔

cyango commented 4 months ago

Looking forward for this, this would be awesome to work with uikit!