Sup.
Hey i was wondering, is there a way to attach our lookAt() method to an object??,
for instance, if i have a box that moves from left to right, then forward backward,
i it possible to have the view always ...."VIEWING" that object?
Thanks...... anyway i'll keep on looking
It can be implemented directly in the View class or you can make another object (which needs to be updated each step), like :
public class ViewLookingAtObject {
Transform3D t;
public ViewLookingAtObject(View v, Transform3D t) {
this.t = t;
}
public void update(Vector3f camerapos, Vector3f up) {
view.getTransform().lookAt(camerapos, t.getTranslation(), up);
}
}
And I agree it's an interesting feature to have. And we can add more camera behaviors later. If you want to implement them and attach a file or send a patch I'll be pleased to include them in the toolkit.