0
$\begingroup$

If I have a position in 3D space in relation to point 0,0,0 and look-at direction 0,0,1 (looking ahead into the z plane) and I wish to find where that point is in relation a new position and direction, how would I calculate this new position?

An easier way to look at this would be to placing a video camera at the source position, facing the source direction, place the object at an arbitrary position, taking a few steps in any direction and tilting the camera in any direction, and physically moving the object so it remains the same image in the viewport.

vector problem

  • 1
    If you go a distance $d$ in the direction of $(0,0,1)$ from $(0,0,0)$, then you get to the point $(0,0,d)$. I don't think that's what you're asking, so I guess I don't really understand your question2017-02-06
  • 0
    the object has a position vector, example (25,33,11) relative to position (0,0,0) so I need to apply this position to the new position and direction vectors. Perhaps I made it confusing with the look-at direction, I meant to say the video camera starts off looking in this direction and then changes.2017-02-06
  • 0
    So the object starts off at the position coordinates and walks a distance $d$ in the direction that the camera is pointing. Is that the idea?2017-02-06
  • 0
    not a distance but a vector, but yes. it walks a vector relative to a camera with a source position and direction, then the camera moves and tilts, now I need to find out it's new position.2017-02-06
  • 0
    Okay, the *source* position is distinct from the *object* position. The *source* position is the position of the camera. The object moves according to some vector (specified relative to the source position), and the camera rotates according to "some kind of directions". Your question, as I understand, is: how should you update the position of the object as it appears on the "view port", which is a 2D rendering from the camera's point of view. Did I understand that correctly?2017-02-06
  • 0
    yes, as though the camera has grabbed the object, and is rotating and moving in accordance with the camera.2017-02-06
  • 0
    I feel like the answer is going to be finding the normal and magnitude of the object's direction vector, the normal of the new direction, doing a calculation between the 2 normals, and multiplying the objects magnitude.2017-02-06
  • 0
    Are you saying that the camera is tracking the object? I don't understand the camera rotation instructions.2017-02-06
  • 0
    the camera is not tracking the object, it is the reverse of that. the 3d position of the object is being updated in accordance to the position and rotation of the camera.2017-02-06

0 Answers 0