Hi there,
So I mastered the code of making an object(my helicopter) fly across the screen, but it’s at vector speed 1 which is excruciatingly fast. I add a 0.3 decimal to slow down the object, but it says that the ‘*’ sign is invalid and can not be doubled or something like that. Could someone please help with this?
Thanks!
Gabriel
You can not multiply a Vector3 with a value of type double.
You have to declare the value as a float if you use a comma value.
Vector3 test;
test = Vector3.up * 1; //integer -> Does work.
test = Vector3.up * 0.3;//double -> Does not work. will produce CS0019
test = Vector3.up * 0.3f; //float -> Does work.