public class Vector3Float {
public float x, y, z;
}
i need a Vector3Float that holds the X Y and Z of my camera (in one variable). I really feel stupid asking this question, but ive just never needed to make my own data type before until now
public class Vector3Float {
public float x, y, z;
}
i need a Vector3Float that holds the X Y and Z of my camera (in one variable). I really feel stupid asking this question, but ive just never needed to make my own data type before until now
// Initialising
Vector3Float vec = new Vector3Float();
// Setting variables
vec.x = 2;
vec.y = 4;
vec.z = 1;
// Accessing variables
int total = vec.x + vec.y + vec.z;
oh my god that is so obvious. thanks! i feel so stupid now
I’m so confused right now. How…what…why did you make this class without knowing what you wanted it for?