How does one rotate a model and change the forward direction of it with the rotation?
I rotate but it just rotates on the axis and the forward is still the same.
This is probably a noob question but it's been kicking me buttocks.
How does one rotate a model and change the forward direction of it with the rotation?
I rotate but it just rotates on the axis and the forward is still the same.
This is probably a noob question but it's been kicking me buttocks.
You can use look at
method to rotate your spatial to a target point. Below sample makes a spatial look at camera with up
vector 1,0,0
spatial_x.lookAt(cam.getLocation(),new Vector3f(1,0,0));
If you just want to rotate about x axis for 0.2 radians:
spatial_x.rotate(0.2,0,0);
Y axis for 1 radian and Z axis for 3 radians:
spatial_x.rotate(0,1,3);