• Advertisement

Archived

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

Vectors!

This topic is 5847 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

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 this post


Link to post
Share on other sites
Advertisement
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 this post


Link to post
Share on other sites
Y is up/down

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

Share this post


Link to post
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 this post


Link to post
Share on other sites

  • Advertisement