Open 9cxndy opened 10 months ago
I tried this before but unfortunately with how camera2's structured this isnt possible in a good way
can you elaborate? doesn't smooth follow also changes camera transformation per frame? isn't this similar to that?
The final Position of a Camera2 camera is "added up" from various different components (Middlewares as they're called). The Map-movement with Noodle maps is seperate, the 360 map rotation is seperate, etc. A middleware in itself cannot strictly "make it point to this world location" unless I was to fundamentally change how Cam2 functioned
Are middlewares applied in a specific order? Is it possible to have the tracking middleware applied last, and let it query the current world position when it's called?
They are but thats kinda hacky because while they are applied in a specific order they are not necessarily processed in that one (And dont really have access to others)
:thinking:
so we just need a special type of middlewares that's guaranteed to be applied last? so it's like
transforms = run normal middlewares;
apply transforms;
run special middleware;
so that the special middleware can query the final position after other middlewares are applied.
code might not be as pristine as it was but I think tracking cam is a useful feature so it's justified.
a camera at a fixed location that always faces the player. similar to the "TurnToHead" option of CameraPlus
ideally the exact position tracked by the camera should be configurable (e.g. an offset from player's position)