All the 3rd camera link is dead,help me

You are an experienced programmer and have a problem with the engine, shaders, or advanced effects? Here you'll get answers.
No questions about C++ programming or topics which are answered in the tutorials!
Post Reply
superpop
Posts: 21
Joined: Mon May 14, 2007 1:17 pm

All the 3rd camera link is dead,help me

Post by superpop »

I want a source code about 3rd camera like wow style.the url had posted is dead.my email is
raygenes@gmail.com.
LarvaExotech
Posts: 5
Joined: Sun Mar 01, 2009 9:25 pm

Post by LarvaExotech »

I dont think that "I WANT" behaviour is correct here...

You just must place ICameraSceneNode* behind your character scene, few pixels in up and headed on some angle down.

I wont post full code here, instead I'll show you way how to do it, you'll learn more.

So first you need your character node, place it somewhere on map and make sure it has collision.

Then create a camera node. Place it 40 units behind character using 3d math:

Code: Select all

vector3df pos = node->getPosition();
float delta_x = cos(angle*0.0175f); 
float delta_z = -sin(angle*0.0175f);
pos.X += delta_X * 40; // 40 units behind
pos.Z += delta_Z * 40; // 40 units behind
camera->setPosition(pos);
and turn it down by a few degree:

Code: Select all

camera->setRotation().Y -= 30;
and of course you must include those two parts in main loop while(device->run()).
superpop
Posts: 21
Joined: Mon May 14, 2007 1:17 pm

Post by superpop »

thank you for your help
Post Reply