-
Notifications
You must be signed in to change notification settings - Fork 25
Focus replay on player #29
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: develop
Are you sure you want to change the base?
Conversation
centering map(WIP);
|
Oh, and just to be clear - this repo is currently in WIP state |
|
You'll want to read the PUBG documentation about the location numbers, but it's basically the position in centimeters from the top left. The rest of the numbers are responsible for scaling and positioning the map based on your zoom level and where you panned to. Getting the focused player's current coordinates will definitely be a key part. Look at the From there, you'll need to do the math required to set Look at the clamping logic in This is a tricky feature, especially since it's the first thing you're investigating, so no worries if you want to bail or work on something else :) I can take the work you've done already and expand on it |
|
Sorry for the long reply - I was on a tiny vacation. Thank you for the response to my questions! I'd like to keep trying to get centering work if this is not any kind of ASAP feature because I really love this challenge, yet, I'm not sure how much time it'll take. |
|
Yeah, go for it. If I get antsy about this feature and want to do it I'll let you know, but have no plans for that. |
|
Hey @apazzolini, it looks like I don't have enough time to work on this PR due to primary job project. So I'd like to notify you about that. Though, I'll be looking to contributing on some other features for pubg.sh when I get some free time - I really love the stuff you did! |
|
No worries mate! |
List of thinks copied from #12:
Map/index.jsFkey)componentDidUpdatehook inMap/index.jswhich'll do recenter stuff on the map on the player ifmsSinceEpochhas changed since the previous rendercomponentDidUpdateyarn run build && serve -s build) and ensure it maintains 60fpsSo as you may see I had some basic things done. I've run into trouble with map centering and I'll try my best to explain problems I'm facing.
First of all it is unclear to me how does PUBG player coordinates (those long 6-digit numbers) are converted into ones that is being used to render player on the map. Yet, I'm aware of
toScale()method but the values this method outputs seems like completely unrelated to map'soffsetXandoffsetYand to PUBG players coordinates as well. Anyway since only<Group/>usestoScale()method probably it means that it is only usefull for canvas-related things, I just don't know.Also there is
mapScalevariable that affects map'soffsetXandoffsetYwhich is pretty obvious and straightforward. At the first glance I thought I could reverse-engineer it to come up with some logic which'd help me to do map centering things, but I have achieved no result at all, so this might be a dead end.I think I need following things to achieve map centering feature:
@apazzolini, please, let me know if you can help with this or at least point me in the right direction. Thanks in advance!