Vector operation

how can I multiply vector by integer

from mathutils import Vector

a = Vector([x, y, z])
b = a * 2
1 Like

Ah, @Liebranca beat me to the typing ^^ his approach is good too.
In-case you are interested, here is my equal or less example.

This code will define a Vector of x=1, y=1, z=1 & multiple those 3 Vector indexes by 2.
The result will be printed to your Blender’s System Console.

import bge
import mathutils

def main():
    print(mathutils.Vector([1,1,1]) * 2)

1 Like

big thanks :blush::blush:

1 Like

thanks for helps