determine the xzdirection from a xyznormal

Community Forums/General Help/determine the xzdirection from a xyznormal

RemiD(Posted 2015) [#1]
Hello,

I have the values (nx,ny,nz) of a normal and i want to determine the xzdirection where the normal points toward so that i can use these values to calculate a xztranslation (a humanoid who slides on a slope from the top of the slope to the bottom of the slope), is it as simple as :
VecX = NX * Speed
VecZ = NZ * Speed

?

I want to be sure.

Thanks,


Floyd(Posted 2015) [#2]
nx,nz is a 2d vector pointing in the direction you want, but it does not have length 1. You must first scale it to length 1 and then multiply by speed.


RemiD(Posted 2015) [#3]
Ok thanks.