-
Notifications
You must be signed in to change notification settings - Fork 739
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
Use getPosASLVisual for icons and camera position #5067
Conversation
So you're saying that |
Some commands can't be used in per frame since BI fixed "teleporting" bug by introducing interpolation to the network code long time ago in arma 2 ao, that's why they came up with these getPosVisual and visiblePosition commands, they work properly if you want to do some per frame visual stuff. |
And why doesn't it work for |
No idea. |
_unit modelToWorldVisual [0,0,0] AGL from model center, render scope ASLToAGL getPosASLVisual AGL from lowest road contact point, render scope I don't think these are identical. What would be needed is a |
I'm not sure what I'm doing wrong but they report 0 difference for ground units and flying units. |
I admit I'm not currently familiar with the intricacies of this PR, but based on the video alone it seems like a good fix. However, it's also worth noting I'm currently undertaking a fairly significant refactor/overhaul of the spectator code based on BIs end game spectator code (which has already enlightened me to some things that can definitely be handled better - I suspect their method of icon rendering should also prove foolproof). As for moving the icon to the exact position of the unit, personally I preferred it above the unit so that it isn't obscuring anything, but if this is preferable to most people I see no reason not to make the change. |
This PR will be made redundant by #5171 (which I expect to have ready to merge fairly soon). However, it could be merged in as a temporary fix if a release occurs before that PR is merged. |
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.
This works as a temporary fix until the overhaul is complete. I back-ported the new unit icons too 😃
When merged this pull request will:
It uses
getPosASLVisual
andASLToAGL
which simulates whatmodelToWorldVisual
does but it updates properly. Tested this in the spectator we use in my community, works properly for any surface (water, underwater, above ground).Example video.
Old - https://youtu.be/j7L0hg4POtY?t=0
New - https://youtu.be/j7L0hg4POtY?t=16