Open topic with navigation
<vizmat>.MoveAlongVector
Calculates a point along a vector by a given amount
<vizmat>.MoveAlongVector( |
|
pos |
vector |
amount |
) |
|
pos
A list of 3 numbers representing the origin to move from.
vector
A list of 3 numbers representing the direction to move in.
amount
The amount to move in the given direction
Remarks
This command will calculate the position by moving from a starting point along a vector by a given amount.
Return Value
A list of 3 numbers representing the new position
Example
import vizmat
pos = [0,0,0]
vector = [0,1,0]
amount = 4
#This will print out:
# [0,4,0]
print(vizmat.MoveAlongVector(pos,vector,amount))