How to get such a vector in 3D space

Hi Folks,
in 3D world space we have a point/vector w (position) + orientation (roation).
How can i get such a vector v that fills the following conditions

  1. vector (w - v) has the same orientation
  2. distance between w and v ist d, or norm of vector (w - v) is d.
    I know how to calculate in 2D but have difficulty in 3D space.
    Please help me, thanks

I’m a little puzzled by this one, as vectors do not have an orientation. Do you mean you want it in the direction of “forward” based on the orientation?

hi manta i meant an euler angle/quaternion by orientation/rotation.
i know how to solve this problem under 2D space. but what’s the common method under 3D.

HI I upload an image to describe this problem in 2D. but i need a solution in 3D space

2397553--163424--ddd.jpg