Page 1 of 1

A couple Questions

Posted: Thu Jul 12, 2007 1:43 am
by dejai
Hey I was wondering how would I attach a camera to follow a player in 3rd view. Also like how to make it move if i press w it goes forward and animates with run? Also how to make a sound come through like say i recored hello and if i press t it says hello.

1. make a 3rd person camera follow a node.
2. make the node move when buttons are pressed. w,a,s,d
3. make a sound when a button is pressed.
4. make other players talk when you press a button near them.

I know this is a lot to ask, I just have found it hard to find information on it thanks :D

Posted: Thu Jul 12, 2007 4:00 am
by Elazul
i don't know about 1,2 and 3

but the easiest way to do the sound thing, is to use Irrklang

and just use the audioplay function to play that sound file whenever you pretty that button.

such that :

case KEY_KEY_T:
{
Audioengine->play2D("hello.wav"); }
Check the irrklang tutorials

Posted: Thu Jul 12, 2007 10:47 am
by dejai
Hmm thanks :D

Posted: Thu Jul 12, 2007 1:07 pm
by Jgoldnight
Look at the tutorials provided with the engine. There's a tutorial on node movement via an eventreceiver.

For the camera following a node, there are two ways. First, you can set the mesh node as the parent of the camera. The next way is to just update the camera's position based on the mesh's position.

For sound, look at the tutorial 'Demo' that uses IrrKlang.

As a little note, research your questions a bit on the forum before posting. These questions that you posed are all answered in the provided tutorials. It just takes a bit of effort.

Hope it helps.