#### Archived

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

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

## Recommended Posts

Hello all. the walkbias works if y=0....but say if I jumped up a level and now y=10....the walkbias still acts as if y=0. how do I get the walkbias to work no matter what my base Y equals. here''s the code: if (walkbiasangle >= 359.0f) { walkbiasangle = 0.0f; } else { walkbiasangle+= 10; } walkbias = (float)sin(walkbiasangle * piover180)/20.0f; ypos = -walkbias-0.15; UpdatePosition(-xpos,-ypos,-zpos);

##### Share on other sites
any help and direction is greatly appreciated!

##### Share on other sites
Easy, Create a new variable that will hold your final ypos. like:

float biasedYpos;

then, change the last line to:

biasedYpos= ypos - walkbias-0.15f;

and make sure you translate the camera using the biasedYpos and not the regular ypos.

Sander Maréchal

GSACP: GameDev Society Against Crap Posting
To join: Put these lines in your signature and don't post crap!

[edited by - sander on July 8, 2003 10:09:23 AM]

##### Share on other sites
awesome thank you!!

1. 1
Rutin
19
2. 2
3. 3
4. 4
5. 5
frob
12

• 15
• 13
• 9
• 12
• 10
• ### Forum Statistics

• Total Topics
631442
• Total Posts
3000104
×

## Important Information

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!