WOW controller in Irrlicht
-
juli
WOW controller in Irrlicht
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 .
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
Hi,
I'd like to help you. If you're still interested in creating the wow-class
please contact me: silberdrache@gmx.de.
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
-
xterminhate
- Posts: 206
- Joined: Thu Sep 01, 2005 9:26 pm
- Location: France
i finished the wow camera class
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
give me a week, and i'll release the source code
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
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
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
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