-
Notifications
You must be signed in to change notification settings - Fork 20
Spectate player at center of screen #1611
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
base: master
Are you sure you want to change the base?
Spectate player at center of screen #1611
Conversation
|
One issue I've found using this so far is that it's difficult to know exactly who is closest to the center of the screen without a crosshair |
|
Now I'm wondering if it would be better to workout the player closest to the center client side and have a command sent to the server to spectate a specific player instead, that way there wouldn't be any issues with prediction and you could also use this for binds to spectate specific players without looking at them |
|
I can test this out later today. I do have a suggestion, though not sure how much of a lift it is on your end. Would it be better to draw a camera icon or the players name above their head when they are the one closest to the clients screen center? |
Agiel
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What's the status of this PR? I think it's fine to merge as is. If we want more explicit feedback before switching to the new target we can add that later.
| Vector vecToTarget = pPlayer->WorldSpaceCenter() - pNeoPlayer->EyePosition(); | ||
| vecToTarget.NormalizeInPlace(); | ||
| float dotProduct = DotProduct(vecForward, vecToTarget); | ||
| if (dotProduct > targetDotProduct && dotProduct > 0) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
dotProduct > 0 seems a bit generous here. Maybe do 0.5 for a 60º cone?
Description
A command that will set the observer target to the closest valid observer target to the center of a spectator's screen