Tformvector help

Blitz3D Forums/Blitz3D Programming/Tformvector help

The forum is locked. These are the original blitzbasic.com forums, kept so they can still be read. No new topics, replies or edits can be made here. To join in, head over to the Blitz3D+ forums.

Use a helper pivot and align it to the vector and then tformvector

;assume d.vector3 is destination
;assume w.vector3 is the world vector
;assume n.vector3 is the new vector

global HelperPivot = createpivot()

.
.
.

aligntovector HelperPivot, d\x, d\y, d\z, 3
tformvector w\x, w\y, w\z , 0 , HelperPivot
n\x = tformedx()
n\y = tformedy()
n\z = tformedz()



You could also use Dot product for this.

Stevie