Jump to content

PUBG-stylized compass spins inversely.


Moony

Recommended Posts

[SOLVED]

Hello, MTA community.

Recently, I've started practicing setting up a server and building it. I've been dowloading seemingly simple resources to get the hand of .Lua, .xml, the admin panel, and whatnot.

I found this compass, which adds the compass from PUBG. It is a horizontal scrolling ruler on the top center of the screen. North and south show as they should, but the east and west are inverted; not because of the text, it's because of the scrolling being inverted. In other words, if the player turns the camera to the right side of the character, the compass scrolls to the right (it should be the opposite of where the player is turning the camera). Similarly, if the player turns the camera to the left side of the character, the compass scrolls to the left.

It's my first time posting about server development. If you wish to see the .Lua or .xml files, don't hesitate on asking.

UPDATE:
After trying to read and understanding a few items of the client.Lua, I realized that the solution would be to invert the value. If the compass moves along with the camera, I need to invert the movement, so it moves contrary to the camera's X axis.
Line nº40 is <local _, _, r = getElementRotation(getCamera())>. Is this the one I need to invert? How can I do so?

Edited by Moony
Added more information + Typos.
Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...