WOW controller in Irrlicht

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
juli

WOW controller in Irrlicht

Post by juli »

Hello

I am currently working on a WOW character controller in irrlicht, I finally got the camera to follow a node, (thanx to Xaron)

as the node walk around the terrain, the camera moves smoothly spherically around the node,

Since i haven´t play wow for a long time , i forgot what the wow controller does , can any body give me a list of all the actions in wow ???

Does anybody want to help me on it? Once we finish the class, we can share it with all irrlicht users .
Silberdrache
Posts: 9
Joined: Tue May 02, 2006 3:17 pm
Location: Zürich, Switzerland

Post by Silberdrache »

Hi,

I'd like to help you. If you're still interested in creating the wow-class
please contact me: silberdrache@gmx.de.
xterminhate
Posts: 206
Joined: Thu Sep 01, 2005 9:26 pm
Location: France

Post by xterminhate »

Return to Irrlicht after years... I'm lovin it.
It's hard to be a Man !
Si vis pacem para belum
dawasw
Posts: 357
Joined: Tue Aug 10, 2004 4:39 pm
Location: Poland

Post by dawasw »

Xterminhate camera is the best I ever seen. I use it to a hack'n'slash rpg project.

/ Offtopic

Xterminhate were you working with newton for the last time ;) ?
xterminhate
Posts: 206
Joined: Thu Sep 01, 2005 9:26 pm
Location: France

Post by xterminhate »

I developed a new 1+3 smooth camera using newton but it is not yet finalized. I'm going to post it .... :D
Return to Irrlicht after years... I'm lovin it.
It's hard to be a Man !
Si vis pacem para belum
dawasw
Posts: 357
Joined: Tue Aug 10, 2004 4:39 pm
Location: Poland

Post by dawasw »

Incredible !

That are really great news.

I will post a shot from my latest game later to show you how great your camera is :cry: me so happy u exist :D
juliusctw
Posts: 392
Joined: Fri Apr 21, 2006 6:56 am
Contact:

i finished the wow camera class

Post by juliusctw »

I finished the class, but its really hacked, i should probably fix up the code before i post it here
Silberdrache
Posts: 9
Joined: Tue May 02, 2006 3:17 pm
Location: Zürich, Switzerland

Post by Silberdrache »

@juliusctw

I'm really curious to test your class..so keep on fixing, please :wink:
juliusctw
Posts: 392
Joined: Fri Apr 21, 2006 6:56 am
Contact:

give me a week, and i'll release the source code

Post by juliusctw »

give me a week, and i'll release the source code
jreuschel1
Posts: 25
Joined: Sun Nov 12, 2006 7:51 pm
Contact:

Here is a simple FOLOW camera

Post by jreuschel1 »

this function works properly with irrlicht 1.1

after searching the forum for many different things for my own projects i have compiled this function from my forum search results i have used in my programs

space ship cameras, camera positioning, flight simulators, and 1st3rd RPG controls

here is the function i have created for what i think is a very good 1st3rd Camera

Code: Select all

void WoWCamera(ICameraSceneNode* cam,ISceneNode* camTarget ,float camPan ,float camTilt,float camZoom)
{
vector3df CPosVector;
vector3df NewCamLocation;
vector3df Target1;

//camPan==0 places camera behind Model "farie" camPan range 0-360
//camTilt inputs should be between -89 and +89

CPosVector.X=cos((camPan+180)*PI/180)*sin((camTilt+90)*PI/180);
CPosVector.Y=cos((camTilt+90)*PI/180);
CPosVector.Z=sin((camPan+180)*PI/180)*sin((camTilt+90)*PI/180);

matrix4 m2;
m2.setRotationDegrees(camTarget->getRotation());
m2.transformVect(CPosVector);

//all i know is that the vector transformation somehow gives a vector which you can multiply by a zoom value

Target1=camTarget->getPosition();
NewCamLocation.X=Target1.X+CPosVector.X*camZoom;
NewCamLocation.Y=Target1.Y+CPosVector.Y*camZoom;
NewCamLocation.Z=Target1.Z+CPosVector.Z*camZoom;

cam->setPosition(NewCamLocation);
cam->setUpVector(vector3df(0,1,0));
cam->setTarget(vector3df(Target1));
cam->updateAbsolutePosition();

//TODO: IF Camera Distance == CLOSE then make model semi transparent 
//if(camZoom<10){
//	{
}

Simply Move your model however you choose then call the function after each move

The Arguments for this function are :
(ICameraSceneNode* cam,ISceneNode* camTarget ,float camPan ,float camTilt,float camZoom)

cam= the camera to move
camTarget = SceneNode for camera to Target
camPan = rotation around Y Axis (around Up Axis)
camTilt = Tilt angle use angles between -89 and +89 for best results

Just make your custom controls for pan and tilt and zoom and call this function with your custom values

you can improve this function by inserting another argument for "target offset vector(XYZ)" location and modifying the code by adding offset vector to Target Position(XYZ) values
Post Reply