camera->getRotation() gives zeros :(

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
Serg Nechaeff
Posts: 162
Joined: Wed Nov 26, 2003 5:24 pm
Location: Europe

camera->getRotation() gives zeros :(

Post by Serg Nechaeff »

I need to get the rotation values of my FPS camera, but getting zeros :( Please help!

Code: Select all

void Draw2DStuff()
{

	wchar_t tmp[1024]; 	
	
	core::vector3df v=camera->getRotation();


	swprintf(tmp, 1024, L"camera x- %f", 
			v.X); 

	font->draw(tmp, 
		core::rect<s32>(0,00,300,80),
		video::SColor(255,255,255,255));


	swprintf(tmp, 1024, L"camera y- %f", 
			v.Y); 

	font->draw(tmp, 
		core::rect<s32>(0,20,300,80),
		video::SColor(255,255,255,255));


	swprintf(tmp, 1024, L"camera z- %f", 
			v.Z); 

	font->draw(tmp, 
		core::rect<s32>(0,40,300,80),
		video::SColor(255,255,255,255));



}
http://www.javazing.com
P-III-950, WinXP, GeForce FX5600 128 MB ForceWare 52.16, DX9, Eclipse IDE, JRE 1.6
Arudil
Posts: 27
Joined: Sun Sep 28, 2003 7:59 am
Location: Germany
Contact:

Post by Arudil »

are you using 0.4 or 0.4.1?
Serg Nechaeff
Posts: 162
Joined: Wed Nov 26, 2003 5:24 pm
Location: Europe

Post by Serg Nechaeff »

0.4
I guess that's why :)
http://www.javazing.com
P-III-950, WinXP, GeForce FX5600 128 MB ForceWare 52.16, DX9, Eclipse IDE, JRE 1.6
Arudil
Posts: 27
Joined: Sun Sep 28, 2003 7:59 am
Location: Germany
Contact:

Post by Arudil »

i don't know if it's the same problem, but i had a problem with the rotation auf the camera, too, in 0.4. But i can't use 0.4.1 because a bug und win98^^
hell_bird
Posts: 18
Joined: Mon Nov 03, 2003 12:30 pm

Post by hell_bird »

i use irrlicht 4.1 but if i try the call

weapon->setRotation(camera->getRotation());

nothing happens to the Weapon
Post Reply