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

[feature request] positionable tracking cam #105

Open
9cxndy opened this issue Sep 4, 2023 · 6 comments
Open

[feature request] positionable tracking cam #105

9cxndy opened this issue Sep 4, 2023 · 6 comments
Labels
enhancement New feature or request

Comments

@9cxndy
Copy link

9cxndy commented Sep 4, 2023

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)

@9cxndy 9cxndy added the enhancement New feature or request label Sep 4, 2023
@kinsi55
Copy link
Owner

kinsi55 commented Sep 4, 2023

I tried this before but unfortunately with how camera2's structured this isnt possible in a good way

@9cxndy
Copy link
Author

9cxndy commented Sep 5, 2023

can you elaborate? doesn't smooth follow also changes camera transformation per frame? isn't this similar to that?

@kinsi55
Copy link
Owner

kinsi55 commented Sep 5, 2023

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

@9cxndy
Copy link
Author

9cxndy commented Sep 6, 2023

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?

@kinsi55
Copy link
Owner

kinsi55 commented Sep 6, 2023

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)

@9cxndy
Copy link
Author

9cxndy commented Sep 6, 2023

🤔

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants