Sign in to follow this  

i have a land normal and a guy

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

do i have to use a martix? i wanted to be able to find the x and z and y angles seperately of a vector.

im on my 38th computer, cmon, gimme. im american, americans might know whaqt the word gimme is. and i need life insurance. I bought a busines liscence for game programming, im making a twisty racing fighting game, can you gimme the formula? I would have wasted all day long about five years ago, but by now my patience and food intake is about dead and buried. I dont ever hack any blinking computer at all, can you ever gimme something back, like the formula im after? I feel like being upfront about the amount of money thats gone through my famiulies walltes liek diareah through toilet pipes. can i get some formula?

[Edited by - amerisgeekon on January 6, 2008 6:22:15 PM]

Share this post


Link to post
Share on other sites
Theres no 'forumula' per se,
Rather all you have to do is set the 'guy's local z axis equal to the normal of the floor, then decide on where his local x and y should point.

Typically I'll just choose to keep the previous direction he was facing matching the new position. (where y is his front)

So something like:
given:
z0,y0,x0,floornormal

z1=floornormal
x1=y0 cross z1 //note the use of y0 here, to ref. the previous dir. heading
y1=z1 cross x1
normalize x1
normalize y1
normalize z1

then just use those 3 axis to define an orientation matrix, much simpler than trying to compute a set of angles

Share this post


Link to post
Share on other sites

This topic is 3627 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.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this