Jump to content

Issues found with Vector2/Vector3


Chuckleberry Finn

Recommended Posts

I appears Vector2 is meant to be exposed but it can't be utilized because of this lua file: `ProjectZomboid\media\lua\shared\Util\Vector2.lua'

 

The lua file in question defines Vector2 (={}) and includes two functions which can't really be used and are already within the Vector2.class. So it is probably safe to remove this file.

Link to comment
Share on other sites

I opted to use Vector3's but there seems to be a few issues with how they're written in Java.

A few Vector3 methods (like aimAt()distanceTo(), etc) have params/args typed to Vector2 - is this intentional? Cause it prevents some usage in Lua due to the above stated bug.

 

edit: even tostring refers to Vector3 as "Vector2" and is missing the Z.

 

Furthermore, Vector3's lack getters/setters for XYZ so it, even if you opt to circumvent the broken methods, becomes extremely limited.

 

Edited by Chuckleberry Finn
Link to comment
Share on other sites

  • nasKo changed the title to Issues found with Vector2/Vector3

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
×
×
  • Create New...