more tutorials for beginners

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
Gav
Posts: 23
Joined: Fri Jul 16, 2004 12:28 pm

more tutorials for beginners

Post by Gav »

I found the example's included with the engine very helpful for learning about the graphics side of the engine (loading meshes etc)
but was wondering if anyone knew of some more, one thing I'm a bit confused about is the types of variables irrlicht uses (particularly how can i take data such as vectors etc and turn them into strings??) and things like that.
I am not exactly an experienced programmer although I know all the basics and can usually understand something once I see it.

A nice simple example would be how to take the position of the collision in example 7 from the engine and display it on the screen. (using device->setWindowCaption() ???)

:)

thanks
Asterisk Man
Posts: 62
Joined: Wed Jun 09, 2004 5:51 am

Post by Asterisk Man »

get the vector3df from ISceneCollisionManager->getCollisionPoint(), and do the following:

ISceneCollisionManager *cols = smgr->getSceneCollisionManager();
while(device->run())
{
vector3df point = cols->getCollisionPoint(fill in vars here);
wchar_t tmp[1024];
swprintf(tmp, 1024, L"X:%f Y:%f Z:%f", point.X, point.Y, point.Z);
device->setWindowCaption(tmp);

//add your drawing routines here
}

and you're done!
Gav
Posts: 23
Joined: Fri Jul 16, 2004 12:28 pm

Post by Gav »

thanks - pretty sure i understand all that! :?

not at my pc at the moment but it seems to make sense. . . . although no doubt once compile-time comes around therell be something as per usual! :P
Gav
Posts: 23
Joined: Fri Jul 16, 2004 12:28 pm

Post by Gav »

from ISceneCollisionManager->getCollisionPoint()

how do i get the vector3df because it returns true or false rather than the vector. (once again not at my PC but i am quite certain this is the case) :roll:
Sean Doherty
Posts: 40
Joined: Tue Jul 20, 2004 12:21 am

Post by Sean Doherty »

Gav wrote:from ISceneCollisionManager->getCollisionPoint()

how do i get the vector3df because it returns true or false rather than the vector. (once again not at my PC but i am quite certain this is the case) :roll:
Gav,

I have not tried it; but I assume that the outCollisionPoint reference parameter is the point of impact.

virtual bool getCollisionPoint (const core::line3d< f32 > &ray, ITriangleSelector *selector, core::vector3df &outCollisionPoint, core::triangle3df &outTriangle)=0
Sean Doherty, BCS
www.FreelanceGames.com
Gav
Posts: 23
Joined: Fri Jul 16, 2004 12:28 pm

Post by Gav »

*takes a step back*

:D okay maybe i need to learn more basics. .. heh i KIND OF understand what you are talkin about :shock:


*advances very slowly* :?
Post Reply