Jump to content
• ### What is your GameDev Story?

• Advertisement

#### Archived

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

# Vectors!

This topic is 6183 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

##### 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

##### Share on other sites
Y is up/down

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

#### Share this post

##### Share on other sites
What IS the problem?

-Lonely

#### Share this 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

##### Share on other sites
I got it working with rotation matrixies

#### Share this post

##### Share on other sites

• Advertisement
• Advertisement
• ### What is your GameDev Story?

In 2019 we are celebrating 20 years of GameDev.net! Share your GameDev Story with us.

(You must login to your GameDev.net account.)

• ### Popular Now

• 15
• 11
• 9
• 38
• 16
• Advertisement
• ### Forum Statistics

• Total Topics
634128
• Total Posts
3015694
×

## Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!