Declare new Vector3


#1

Hello,
How do I declare a new Vector3?

var myvec3 = new Vec3(x,y,z); //this does not work…


#2

Hi. To set a Vec3 with x, y, z values of 1, 2, 3 …

var myvec3 = { x: 1, y: 2, z: 3 };


#3

Sure, but I want to declare dynamic values. How do I do that?
x = 1, y=2, z=3;
var myvec = {x: x, y: y, z: z};


#4

Yes, that’s how to do it.


#5

Thank you. That Works :slight_smile: I was overthinking it.