I have an axis in world coordinates, as defined by 2 vectors, for example one that points upwards at x = 10
:
const axisStart = new Vector3(10, 0, 0)
const axisEnd = new Vector3(10, 0, 1)
I’m getting the normalized axis direction like so:
const axisDirection = new Vector3().subVectors(axisEnd, axisStart).normalize()
How can I rotate a vector (e.g. Vector3(50, 0, 0)
) around my original axis?
I’ve tried using Vector3.applyAxisAngle(axisDirection , radians)
, but because the axis has been normalized, the rotation happens around the world center (0, 0) and not around the axis’ original position.