Vector3 vNewDir = Vector3.Subtract(vPos, vLookAt);
Vector3 vNewPos = Vector3.Add(vPos, vNewDir);
Vector3 operation question
I have 2 points:
Vector3 vPos, vLookAt;
After these 2 operations, shouldn't vNewPos = vLookAt
It might, depending on the order of the subtraction in Subtract(). But then you can always change the order of the parameters. Why don't you try it out?
I am missing something...
v = p2 - p1
Point direction form of a ray:
p2(t) = p1 + v(t)
when t = 1
p2 = p1 + v
p1 = 5, p2 = 2
v = 2 - 5
2 = 5 + -3
v = p2 - p1
Point direction form of a ray:
p2(t) = p1 + v(t)
when t = 1
p2 = p1 + v
p1 = 5, p2 = 2
v = 2 - 5
2 = 5 + -3
ok .. i see it . my post was inconsistent with the code. please cut me some slack .. i am somewhat new to this :)
Quote:Original post by pbergeron
ok .. i see it . my post was inconsistent with the code.
No worries. I figured it was something like that.
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement