Camera Behind Vehicle
Camera Behind Vehicle
How to set camera exactly behind vehicle
In My case Its carNode and its IAnimatedMeshSceneNode ??? and i am using IrrBullet Raycast Vehicle
http://irrlicht.sourceforge.net/forum/v ... =1&t=45529
In My case Its carNode and its IAnimatedMeshSceneNode ??? and i am using IrrBullet Raycast Vehicle
http://irrlicht.sourceforge.net/forum/v ... =1&t=45529
When it's all over, it's not who you were. It's whether you made a difference
-
- Posts: 1186
- Joined: Fri Dec 29, 2006 12:04 am
Re: Camera Behind Vehicle
The recommended way to do this stuff is to write a custom camera animator. Have a look at the FPS animator and see how it's done.
"Whoops..."
Re: Camera Behind Vehicle
don't know how to do it can you please elaborate it little more
When it's all over, it's not who you were. It's whether you made a difference
Re: Camera Behind Vehicle
i don't know about the specific animator but my solution is to
set the came as a child of the node
then set a camera up vector and a camera target vector
and pass them through the node to be folowed matrix
set the came as a child of the node
then set a camera up vector and a camera target vector
and pass them through the node to be folowed matrix
Re: Camera Behind Vehicle
@grantye plz give me example code
When it's all over, it's not who you were. It's whether you made a difference
Re: Camera Behind Vehicle
erm, look at how other camera animators are implemented (in irrlicht source folder), write one yourself that would do the math to maintain it's possition behind the car scene node? AND read the API doc to figure out what does what..mubashar wrote:don't know how to do it can you please elaborate it little more
If you have little knowledge of c++ and OOP, that's another question.
Working on game: Marrbles (Currently stopped).
Re: Camera Behind Vehicle
@serengeor yeah actually i am thinking there might be some easy way or code available so my time saved .... well i can give it try if no alternative solution is there
When it's all over, it's not who you were. It's whether you made a difference
Re: Camera Behind Vehicle
what i gave you is the easy way the code just need to be called befor a render call
Re: Camera Behind Vehicle
Erm, I can't really see how hard and time time consuming can this be.. If you know the basics, it's pretty much +- 1hr of coding depending on how complex you want the movement of the camera to be.mubashar wrote:@serengeor yeah actually i am thinking there might be some easy way or code available so my time saved .... well i can give it try if no alternative solution is there
Or you can just update the camera in the main loop.
Working on game: Marrbles (Currently stopped).
Re: Camera Behind Vehicle
@Granyte applied your solution but camera looks very unnatural ...
When it's all over, it's not who you were. It's whether you made a difference
Re: Camera Behind Vehicle
Then do a controller (animator) that would translate to the final position over some time instead of doing it instantly, if that is what you want ofc.mubashar wrote:@Granyte applied your solution but camera looks very unnatural ...
Working on game: Marrbles (Currently stopped).
Re: Camera Behind Vehicle
i don't know how you implemented it but on my end it feel like if the camera is ducktaped on the controled object
it's not the most natural camera but it's quick easy and dirty
but if you wan more advanced stuf you will have to learn how to dow it
it's not the most natural camera but it's quick easy and dirty
but if you wan more advanced stuf you will have to learn how to dow it
Re: Camera Behind Vehicle
Successfully implemented much better camera got idea from bullet Vehicle demo its quite nice
When it's all over, it's not who you were. It's whether you made a difference
Re: Camera Behind Vehicle
When i have to make a camera move smoothly, i interpolate the original position of the camera target and the intended position of the camera just in the middle, and then, i use that point as the new camera target. The advantage is that the camera moves much more smoothly, the drawback is that if the vehicle moves too fast, it may disappear from the screen, but that only happens with very fast motions, and in most cases, it behaves very well.
"There is nothing truly useless, it always serves as a bad example". Arthur A. Schmitt
Re: Camera Behind Vehicle
I find using smooth(er)step makes for very nice camera transitions.