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

Multi camera 3d setup doesn't update collision shapes translation properly #52345

Open
Tracked by #45333
lofihung opened this issue Sep 2, 2021 · 2 comments
Open
Tracked by #45333

Comments

@lofihung
Copy link

lofihung commented Sep 2, 2021

Godot version

3.3.3 stable

System information

windows 10, gles3, intel hd 520

Issue description

when instancing a two viewport + camera with different cull layers to display different objects at the same time in the same screen space, the second camera updates object's translation but if the object have a collision shape this won't be updated.

As far as I can see the collision shape translation is asigned always to the first camera translation.

having a two camera setup is handy in shmup genre with one orthographic static camera rendering entities and one perspective dynamic camera rendering stage objects.

Steps to reproduce

.node

..kinematicbody
...meshinstance (visual instance 1)
...collisionshape

..kinematicbody2
...meshinstance (visual instance 2)
...collisionshape

.viewportcontainer
..viewport
...camera (cull 1)

viewportcontainer2
..viewport
...camera (cull 2)

Minimal reproduction project

in the proyect I've added an animation player moving the second camera translation, might need to check visible collision shapes in debug menu

MultiCamSetup.zip

@pouleyKetchoupp
Copy link
Contributor

We could add an option in CollisionShape3D to set a cull mask for the debug shape (in 4.0 we'll probably have other debug options anyway like custom color).

@lofihung
Copy link
Author

lofihung commented Sep 7, 2021

you guys are the magicians, anything that helps solve problems easier always get handy, but dont forget the bug before adding new features

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

No branches or pull requests

3 participants