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.
Tyn
Posts: 932 Joined: Thu Nov 20, 2003 7:53 pm
Location: England
Contact:
Post
by Tyn » Tue Apr 06, 2004 4:34 pm
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 » Tue Apr 06, 2004 4:37 pm
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 » Tue Apr 06, 2004 4:40 pm
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
enforceman
Posts: 26 Joined: Sat Jan 03, 2004 3:43 pm
Post
by enforceman » Tue Apr 06, 2004 9:08 pm
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 » Tue Apr 06, 2004 11:11 pm
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