Ogniok
Member
|
Camera rotation
Hi!
I'm actually writing a game using Esenthel and I have a problem. In my game, we're driving a car. I want the camera to be behind the car all the time. My code do this, but when the car have rotation != 0 camera doesn't rotate. How I can do this? Is there a variable, which get/set car(Actor) rotation?
Code:
Cam.setSpherical(car.pos() + Vec(0, 1, -1), 0, 0, 0, Cam.dist);
Sorry for my English
(This post was last modified: 02-01-2010 09:10 AM by Ogniok.)
|
|
02-01-2010 09:10 AM |
|
Esenthel
Administrator
|
RE: Camera rotation
you can use car.matrix().z, this should be the direction the car is facing
and then you can use other camera method to set it.
|
|
02-01-2010 03:49 PM |
|