Topic category: Help with MCreator software
Ive been making a projectile that chases after the player,which uses the set movement vector block to move.
i have found a formula to calculate the direction from one 3d point to another, which goes like this:
angle = arccos ( a * b / |a| * |b| );
a * b = ax * bx + ay * by + az * bz
|a| = sqrt( ax * ax + ay * ay + az * az )
|b| = sqrt( bx * bx + by * by + bz * bz )
and ive also found the way to change that angle into a 2d vector for x and y, which is explained in this document:
but i dont know the method for turning that 2d formula into a 3d fomula that i can use.
does anyone know how to turn an angle into an X,Y,Z movement vector?
speed should be variable.