Vector3 - CreedVI/Raylib-J GitHub Wiki

The Vector3 data structure is used to store three floats as an x, y, z coordinate trio.

Constructors

Vector3()

Vector3 position = new Vector3();
Results in a Vector3 with the value of 0, 0, 0

Vector3(float x, float y, float z)

Vector3 position = new Vector3(55, 67.4f, 4.3f);
Results in a Vector3 with the value of 55, 67.4f, 4.3f

Methods

setX(float x)

position.setX(53);
Sets the value of x to 53

setY(float y)

position.setY(326);
Sets the value of y to 326

setZ(float z)

position.setZ(33);
Sets the value of z to 33

getX()

position.getX();
Returns the value of x

getY()

position.getY();
Returns the value of y

getZ()

position.getZ();
Returns the value of z
⚠️ **GitHub.com Fallback** ⚠️