Getting camera position

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
Tyn
Posts: 932
Joined: Thu Nov 20, 2003 7:53 pm
Location: England
Contact:

Getting camera position

Post by Tyn »

Hey

I am trying to get the camera position with

Code: Select all

irr::core::vector3df* = camera->getPosition();
But VC++ is spitting out a C2679 error, I think it means that it doesn't like the conversion but the API says it should be right. Anyone got any ideas?
enforceman
Posts: 26
Joined: Sat Jan 03, 2004 3:43 pm

Post by enforceman »

Hi!

getPosition() doesn't return a pointer. It just returns a irr::core::vector3df.

it must be:

irr::core::vector3df = camera->getPosition();


regards, Tom
Tyn
Posts: 932
Joined: Thu Nov 20, 2003 7:53 pm
Location: England
Contact:

Post by Tyn »

Oops, I missed a bit out there. It should be:

Code: Select all

irr::core::vector3df* camPos = camera->getPosition();
Note to self: Always copy straight from source :D
enforceman
Posts: 26
Joined: Sat Jan 03, 2004 3:43 pm

Post by enforceman »

sorry... I made a mistake... ;( I forgot the variable

it must be

irr::core::vector3df camPos = camera->getPosition();

so, now we got it!
Guest

Post by Guest »

Nope, I wasn't clear last time soz, I did irr::core::vector3df* camPos = camera->getPosition(); but that caused the error, the first one I posted was a typo :oops:
Post Reply