Page 2 of 2

Posted: Wed Oct 28, 2009 5:29 pm
by CuteAlien
The patch gives you the lines to change. Add every line marked with a '+' at the start and remove every line marked with a '-' (none in this patch). All other lines are just there to help you find the right place.

Instead of changing the engine you can also copy those files and use them as a start for your own animator. Rename the class, rename the file and then add it to your project. Then you can create it with new and add the animator to a normal camera. (I've not tested this yet myself, but it should work). This is a little more work, but the better solution as patching the engine will turn out to be more work in the long run.

This patch might make it in Irrlicht - lets see what others think of it.

I'm not really sure what setParent would do - it just makes not much sense for this animator. The animators work is about setting the position based on the target. So anything which further influences the position will most likely only cause trouble for it.

Also I have the slight suspicion that would you are looking for might be a 3rd-person-cam. If that's the case - just search the forum, I'm sure you will find some implementations for that.

Posted: Wed Oct 28, 2009 6:02 pm
by someguy99
CuteAlien wrote:The patch gives you the lines to change. Add every line marked with a '+' at the start and remove every line marked with a '-' (none in this patch). All other lines are just there to help you find the right place.

Instead of changing the engine you can also copy those files and use them as a start for your own animator.Rename the class, rename the file and then add it to your project.
So everything is in these 2 files?

This patch might make it in Irrlicht - lets see what others think of it.
I dont see why not. Why have limited cameras and tell everyone to build their own?


Also I have the slight suspicion that would you are looking for might be a 3rd-person-cam. If that's the case - just search the forum, I'm sure you will find some implementations for that.
Well not really. Depends on what you mean by that.
I just want an orbiting camera to follow my character around. Most 3rdp cameras always look at your players back.

Posted: Wed Oct 28, 2009 8:58 pm
by CuteAlien
someguy99 wrote:
CuteAlien wrote:The patch gives you the lines to change. Add every line marked with a '+' at the start and remove every line marked with a '-' (none in this patch). All other lines are just there to help you find the right place.

Instead of changing the engine you can also copy those files and use them as a start for your own animator.Rename the class, rename the file and then add it to your project.
So everything is in these 2 files?
Yes, for a start.
someguy99 wrote:
CuteAlien wrote: This patch might make it in Irrlicht - lets see what others think of it.
I dont see why not. Why have limited cameras and tell everyone to build their own?
Because I've only had time for running a short test so far with example 09. I don't know yet if it will cause any troubles because I don't know enough about how that camera is supposed to work.

Posted: Thu Oct 29, 2009 7:30 am
by someguy99

Code: Select all

 	{
 		OldTarget = camera->getTarget();
 		OldCamera = camera;
+		LastCameraTarget = OldTarget;
 	}
+	else
+	{
+		OldTarget += camera->getTarget() - LastCameraTarget; // translation is still lost
+	}
 
 	core::vector3df target = camera->getTarget();
 
Im guessing you wrote the lines without + to help me find where i should put the ones with + ? I searched CSceneNodeAnimatorCameraMaya.cpp but couldnt find lines like those.

Posted: Thu Oct 29, 2009 1:09 pm
by CuteAlien
someguy99 wrote: Im guessing you wrote the lines without + to help me find where i should put the ones with + ? I searched CSceneNodeAnimatorCameraMaya.cpp but couldnt find lines like those.
Actually I didn't do it myself, but this is the format automatically generated when creating patches. And the first line in this format even gives you the line-number where to search. I can't help you more for that... the lines are there as well in 1.6 as in trunk.

Posted: Thu Oct 29, 2009 3:40 pm
by CuteAlien
I've added it now to the svn trunk. Unless it causes any troubles it will be in Irrlicht 1.7.