jPCT - a 3d engine for Java > Support
Rotation Towards 3D Point
AGP:
Update: sometimes the models are rotating in an axis other than the world's y. Is there a way for me to limit the matrix's rotation to only the y axis?
EgonOlsen:
That shouldn't happen, if you provide an up-vector. It might be a kind of distorted matrix because some input parameters are a bit off. Have you tried to normalize the direction vector?
AGP:
It's normalized and it does frequently (say, 5% of the time) happen that the model get rotated 90 degrees on an axis other than the world's y.
EgonOlsen:
No idea. It's impossible to tell without a test case. I've used this method in several applications, and never had a problem like this.
Navigation
[0] Message Index
[*] Previous page
Go to full version