• Announcements

Archived

This topic is now archived and is closed to further replies.

Vectors!

Recommended Posts

I feel like a n00b maybe becouse it is late(?)... I am trying to add 3d-person view... This is working to move the cam higher: plView.pl_PositionVector(2) += 1.5; This code to move it so you can the player in front of the srceen: ANGLE3D test = plView.pl_OrientationAngle; //gets the angle ANGLE3D dir = test.Normalize(); FLOAT3D add(2,0,0); plView.pl_PositionVector += dir*test; Why isn´t working??

Share on other sites
Would'nt this be correct.

  FLOAT3D add(0,0,1.5);

assuming FLOAT3D add(x,y,z) and Z is the up/down axis

,Jay

Edited by - Jason Zelos on February 16, 2002 6:34:52 PM

Share on other sites
Y is up/down

note the moving the cam up/down is not the problem...

Share on other sites
What IS the problem?

-Lonely

Share on other sites
Sorry, replace up/down with forward/backward.

I assume you are applying add(x,y,z) to the camera position.
If so then the (2,0,0) would be X=2, rather than z=2 ? If your 'add' is applyed to the camera.

Also....

If your array is 1 to 3 (as opposed to 0 to 2) then
  plView.pl_PositionVector(3) += 1.5;

assuming plView.pl_PositionVector(2) += 1.5; is Y as you say.

I'm not sure which bit of code your does what, but I hope that helps.

,Jay

Edited by - jason Zelos on February 16, 2002 9:09:26 PM

Share on other sites
I got it working with rotation matrixies

• Forum Statistics

• Total Topics
627770
• Total Posts
2979002

• 11
• 10
• 10
• 23
• 14