Forum Discussion
7 Replies
GetPlayerState with PlayerStateVector set to position
Will give a players xyz position
Hi Matty101yttam,
Did that, but the coordinates appear to be spherical, not Cartesian. I wish to draw an imaginary line across the 2D map and establish how far a player is from that line and when they have crossed (ala, no-cross snipers)
Thoughts?
@Matty101yttam wrote:GetPlayerState with PlayerStateVector set to position
Will give a players xyz position
GetPlayerState with PSV set to 'position' gives you 'X,Y,Z' when you use Get[X/Y/Z]Component, but what does X/Y/Z refer to, spherical position? Since the X/Y never exceeds 360+/-, am I to assume 'X' is theta (angle relative to X), 'Y' is phi (angle relative to Z) and 'Z' is rho (length of radius)?
Didn't seem to have a max unit for me, have to double check. I know if i set a random vector eg 100,156,256 i can use players vector - the random vector to create a distance indicator on the side of the screen and go to that point.
nope got to x:430 so its more than 360
can just set it up if player_x > 100(just a random map section) then kill player(or whatever).
Give this a try, AARVYA. I am working on a substack article and I will go into the math and how I decoded this, but short version, I used the GetX/Y/ZComponent of the player state, and selected eight points from the small 'Renewal' map. I wrote down the X/Y/Z and it didn't make much sense, so I put the coordinates into Grapher on a mac and got this (see photo). In reference to the flat plane of the mini map, 'Z' is the x axis and 'X' is the y axis, none of which align with the compass. So when you run the AARVYA custom mode, it displays the Game Vector (raw from the GetX/Y/ZComponent math function, Player X/Y is the 'Z' and 'X' values from GetX/Y/ZComponent, Compass X/Y is adjusted (roughly) for the in game compass.
i see don't see any picture...
could you also post the url so i can see the code.
About Battlefield 2042 General Discussion
Recent Discussions
- 17 hours ago
- 23 hours ago
- 2 days ago