if you have linux, please help test my camera

Announce new projects or updates of Irrlicht Engine related tools, games, and applications.
Also check the Wiki
Post Reply
juliusctw
Posts: 392
Joined: Fri Apr 21, 2006 6:56 am
Contact:

if you have linux, please help test my camera

Post by juliusctw »

Hello

I have created a new camera class which follows and animates md2 formats, here's what it does,

left mouse move -- moves the camera around the character
right mouse move -- turns the character
mouse wheel -- Zoom in and out of the character

s character moves left
d character moves back
f character moves right
e character runs
q EMAT_SALUTE
a EMAT_ATTACK
space EMAT_JUMP + extra boost to jump higher
p EMAT_POINT
c EMAT_FLIP

all these are contained within a single class , so you only need to instantiate it like such


//************************************

scene::IamarCamera* Icamera;
Icamera = new scene::IamarCamera((scene::ISceneNode*)anms, smgr, -1);
smgr->setActiveCamera(Icamera);

//************************************

if you have linux, you just need to un tar the file and put it into the example folder along with the other tutorials , run ./cam and it should work.
you can find it here for IamarCamera Md2

http://www.freewebs.com/juliusctw/


I was originally going to build one for x , but since x is not like md2 with standard actions , it would be difficult to create one, I am hoping that irrlicht would have its own format and have a standard set of actions so I can build a customized 3rd person camera for it.

this is a very easy to use camera, for beginners that wants to use another camera besides fps would benefit from this.

Anyway, if you have linux, pleezzz help run it, I am having a lot of trouble picking the size of ellips for collision so the faerie.m2 might fall into the ground, if you have any suggestions on the size of the ellips , please let me know,

core::aabbox<f32> box = yourSceneNode->getBoundingBox();
core::vector3df radius = box.MaxEdge - box.getCenter();

I tried to use this code, but my mesh falls through the ground, I know that if the ellips is smaller than the terrain gaps, it would fall through, so i need to make the ellips big enough, however, if it gets too big , it can't enter buildings. Any suggestions?

please let me know if this runs on your machine fine, thanks
DeusXL
Posts: 114
Joined: Sun Mar 14, 2004 9:37 am
Contact:

Post by DeusXL »

On my Ubuntu dapper, the mesh is always falling down...
I remember I had the same problem with my game (because I wanted to handle collision with terrains and collision with objects seamlessly and with Irrlicht physics) and it was a patch size problem. Actually by setting a higher patch size the problem disappeared but I think that for such complex collisions, using an external physics library would be better because I changed a lot of thing, trying to improve Irrlicht's collision with terrains, and it has never been perfect...
I'll try to find the code of my radius but I remember that I had to do this for every model because it was each time a very strange value...

PS : Does the code work on Windows ?
Irrlicht .NET complete and Cross Platform Wrapper
The kid on my avatar wrote:A painless lesson is one without any meaning
juliusctw
Posts: 392
Joined: Fri Apr 21, 2006 6:56 am
Contact:

glad to hear the code actually runs

Post by juliusctw »

it seems to me that is the ground is flat, i don't have any problems, i am really confused about this radius issue , i have gotten to the point where i just randomly set numbers and hope for the best,

anyway, i don't think that has anything to do with my camera since the collision is completely outside of my camera class, what's your opinion of the camera in general? did the jump look ok? I did the physics myself.

for the window's question: i actually wrote two versions , the windows version worked fine, I did the collision the same way, randomly choosing, but the windows version is really difficult to impliment since i didn't package everything into one class, so i might have to rewrite the windows version agian.

More people , please give feed back, it would really help :wink:
DeusXL
Posts: 114
Joined: Sun Mar 14, 2004 9:37 am
Contact:

Post by DeusXL »

Well the camera works perfectly... I don't find it very easy to use (but this is just an opinion) and for my game again, I copied Dark Age of Camelot's system (middle button click to control the camera position, wheel to control the distance camera<=>target and a soft camera which means that every effect is faded in order not to have brutal changes when the character is stopping for instance).
Irrlicht .NET complete and Cross Platform Wrapper
The kid on my avatar wrote:A painless lesson is one without any meaning
Nalin
Posts: 194
Joined: Thu Mar 30, 2006 12:34 am
Location: Lacey, WA, USA
Contact:

Post by Nalin »

If you are using a small terrain heightmap with a terrain triangle selector for collision, then the falling through the terrain bug is fixed in the CVS version of irrlicht.
HardcoreWizard
Posts: 13
Joined: Mon Jul 10, 2006 12:54 am
Location: Denmark

Post by HardcoreWizard »

I tried compiling your example with the Irrlicht sdk I got from SVN (a couple of days old though). It still doesn't work, in fact, it seems like the fairy is "hovering" above the ground when I zoom out.
juliusctw
Posts: 392
Joined: Fri Apr 21, 2006 6:56 am
Contact:

thank you for the reply

Post by juliusctw »

@ hardcorewidard

i build my camera completely out of the latest version of irrlicht release, i'm not familiar with SVN, is that a different type of irrlicht distribution?

As for the hovering, i think that's due to my choice of ellipsoid size, i'm still confused about that

@ Nalin

the CVS version of irrlicht? is that Nico's latest version that he hasn't released? I don't need it now, I just want to make sure that if its something I have done wrong. Would you happen to know what changes they made to fix this problem, i'm rather curious. ?

@ DeusXL

Thankx for trying it out the controller, I build the controller based on a game called War of warcraft, if you have never played the game, it is a popular game which i was used to...


thanks to everybody for trying it out , . . Do you think its easy enough to impliment for any noobs trying out a different camera than FPS?
juliusctw
Posts: 392
Joined: Fri Apr 21, 2006 6:56 am
Contact:

Another question

Post by juliusctw »

I really don't think this is doable without some major revision, but i thought i'll ask anyway ,

when i zoom in to the character, i would like to make the character disappear so that it becomes a first person camera, the problem is that the IAnimatedMeshSceneNode is the parent of the camera, so if i make the parent invisible, i automatically make the child invisible as well, and the camera goes dead,

i would really appreciate it if somebody can let me know what options i have , thanx
HardcoreWizard
Posts: 13
Joined: Mon Jul 10, 2006 12:54 am
Location: Denmark

Post by HardcoreWizard »

Can't just just save the position of the character, and then recreate the camera when the character is destroyed? Or just hide the character's mesh, and position the camera where it's head ought to be?
Nalin
Posts: 194
Joined: Thu Mar 30, 2006 12:34 am
Location: Lacey, WA, USA
Contact:

Re: thank you for the reply

Post by Nalin »

juliusctw wrote:@ Nalin

the CVS version of irrlicht? is that Nico's latest version that he hasn't released? I don't need it now, I just want to make sure that if its something I have done wrong. Would you happen to know what changes they made to fix this problem, i'm rather curious. ?
My mistake. I actually meant to say SVN. It is the source code repository for irrlicht. Basically, that is where all the latest and most up-to-date source code is stored. But, since it is always constantly being worked on, it might not be stable.

This is where the repository is: https://svn.sourceforge.net/svnroot/irrlicht
You will need an SVN client to extract the code. If you don't want to get the latest version of irrlicht, here is the bug fix:
http://irrlicht.sourceforge.net/phpBB2/ ... highlight=
juliusctw
Posts: 392
Joined: Fri Apr 21, 2006 6:56 am
Contact:

thanx

Post by juliusctw »

@hardcorewizard

Not with the way i have designed the camera, it must have a parent, the way you are suggesting, i would need to create a seperate camera and switch back and forth, this is what i had in mind, I haven't decided if it is worth the effort.

@ Nalin

thanks
Post Reply