I need to transform a vector in worldspace to the coordinate system defined by another vector.
The standard tformvector function only works with entities.
The standard tformvector function only works with entities.
;assume d.vector3 is destination ;assume w.vector3 is the world vector ;assume n.vector3 is the new vector global HelperPivot = createpivot() . . . aligntovector HelperPivot, d\x, d\y, d\z, 3 tformvector w\x, w\y, w\z , 0 , HelperPivot n\x = tformedx() n\y = tformedy() n\z = tformedz()