Page 2 of 2

Posted: Wed Jan 21, 2004 5:20 am
by Elaran
One more question :)

What sort of polycount is this engine capable of handling for main characters in games of a 1st person shooter type? Or perhaps even better, what is the functional range (from lowest to highest)?

this thread enlightened me...

Posted: Wed Jan 21, 2004 3:51 pm
by buhatkj
hehe check this stuff out ;-)

given:

Code: Select all

// disable mouse cursor

	device->getCursorControl()->setVisible(false);

	// add billboard

	scene::IBillboardSceneNode * bill = smgr->addBillboardSceneNode();
	bill->setMaterialType(video::EMT_TRANSPARENT_ADD_COLOR );
	bill->setMaterialTexture(0, driver->getTexture("media/textures/particle.bmp"));
	bill->setMaterialFlag(video::EMF_LIGHTING, false);
	bill->setSize(core::dimension2d<f32>(20.0f, 20.0f));
ok so we have a billboard and we have turned off the mouse pointer ok?

now, in the rendering loop, do this:

Code: Select all

core::vector3df intersection;
		core::triangle3df tri;
		//!get a ray from the current mouse position
		ray = smgr->getSceneCollisionManager()->getRayFromScreenCoordinates(device->getCursorControl()->getPosition());
		if (smgr->getSceneCollisionManager()->getCollisionPoint(ray, selector, intersection, tri)){
				bill->setPosition(intersection);
				lastCursorPosition = core::vector3df(intersection.X,0,intersection.Z);//ignore the y coord
		}
so now what we have is a cute little billboard that doesnt point where the camera is looking, but where the _mouse_ is pointing in 3d. the purpose of this of course, is that that vector, lastCursorPosition, now contains the x and z of the last spot _on_the_ground_ where the cursor pointed, so now if we then go in our event receiver and watch for clicks from the mouse, we can, on a click, tell the "player" to then set lastCursorPosition as a destination they should go to, using something like opensteer to guide them :-) this, (plus a lot of other stuff i have yet to do) should allow me to have character movement like NWN in Fmorg :-)

Posted: Thu Jan 22, 2004 12:11 am
by stodge
I have to chuckle when people complain about Torque; it doesn't do bumpmapping etc... It does because people have programmed it in, though it doesn't do it out of the box, so to speak. And what is "pure C++"?

Posted: Thu Mar 18, 2004 4:16 pm
by LagAlot
my biggest complaints with torque is this:
you HAVE to relight the scene (takes about 3 sec) to change shadows cast by BSP on the terrain. And little things like:they hardcoded the sun vector ..an easy fix mind you but whats up with that?! Shadows cast from entities with transpearancy (ie trees) kills the Frame rate. oh well live and learn.. :)