translate camera target to object rotation

If you are a new Irrlicht Engine user, and have a newbie-question, this is the forum for you. You may also post general programming questions here.
Post Reply
Phunk
Posts: 78
Joined: Sun Dec 14, 2003 8:18 pm
Location: The Netherlands

translate camera target to object rotation

Post by Phunk »

maybe this is posted some time before, but I thought that it was not a solution that worked for me. I have a camera with a target, but I want to let a visible mesh(sphere, box) represent the cam(for other players, split-screen) but my method to change the target is done trough a matrix, and the object is only able to rotate trough sphere->setRotation(vector3df()). I tried to translate the targetvector to a vector that worked for the spere, but it does not work. Can anyone tell me how I can do this? I do not want to use sin() or cos(). Does anyone know the solution?
Greets, Robin
[edit]
let me rephrase that, I have no problem with sin(), but not in my 3d math calculations, I feel that there are enough compicated calc's allready in the code, and when i also need to use this kind of complex(for the processor) calc's in my movement routine(wich is updated every frame) I just get the feeling there is a more elegant solution to it all.(mainly because I came this far with just +,-, and *)[/edit]
Phunk
Posts: 78
Joined: Sun Dec 14, 2003 8:18 pm
Location: The Netherlands

Post by Phunk »

ok, I give in, if nobody can give me an awnser I will use sin/cos :?
Greets Robin
Post Reply