Closed lunarcloud closed 8 months ago
There's nothing that prevents the camera from going through geometry or colliders, unless you add a CollisionShape
to it. Though, doing that could easily lead to it getting caught on a, e.g., a wall, during a tween — so wouldn't recommend it.
What are you looking to achieve?
I just had the camera in a corridor and switching around the corner would clip. I ended up fixing it by adding MORE phantom cameras.
https://github.com/lunarcloud/ggj-2024-rail-shooter
Mostly, I just want a way to suggest a Path or waypoint for the camera to follow on it's way to the next camera.
It wouldn't really be possible with just two PCams
since the tween just interpolates the camera
between two PCam
positions, or 2 keyframes to use an animation / timeline terminology.
If it were to be dynamically conscious of where walls are, then that sounds more like the kind of behaviour you would find in a navmesh system, which is kind of beyond the scope for this project.
For simple things like corners, you could either use the built-in Tween
class and create a dynamic timeline, or, to your point, create more “keyframes” to form a triangular direction by transitioning between multiple PCams
in succession.
Don't think there's anything specific that can be done for this, as this reads as a fairly bespoke request that doesn't have a generic solution.
Feel free to reopen this if you have any suggestions for how to go about it.
Issue description
I've given the camera a path, I've switched priorities, and it goes through walls.
I was expecting either the camera to avoid walls or it to try to follow the path as it transitions.
Steps to reproduce
Example for an on-rails shooter:
(Optional) Minimal reproduction project
No response