Page 4 of 23

Posted: Sat Oct 07, 2006 8:13 am
by Nick_Japan
Uploaded, cheers! You can now get it from the download page.

Posted: Tue Oct 10, 2006 1:41 am
by twentytortures
Hey nick, do you know how to use the setTarget camera control deal for newton objects? When I try to set target on the car (in example 3) it always stays at the car's origin. It doesnt move with the car.

Posted: Tue Oct 10, 2006 5:32 am
by patrickrho
is ragdoll possible with this?

Posted: Tue Oct 10, 2006 7:48 am
by Nick_Japan
@twentytortures - You need to call setTarget() every frame - all it does, as far as I can see, is just make the camera look at the position you pass, but only once. I just tried it out in example 3 - just add the two lines at the bottom so your render loop looks like this:

Code: Select all

	while(device->run())
	{
		driver->beginScene(true, true, SColor(0,100,100,100));

		smgr->drawAll();
		driver->endScene();

		physics.update();

		// make the camera follow the car
		camera->setTarget(car->getPosition());
	}

@patrickrho: No ragdolls yet - they're a little way off

Posted: Tue Oct 10, 2006 12:58 pm
by needforhint
WoW, I just got to this thread, and yeah.
Cool stuff, I am just through the download, see ya, vzzzzrch

Posted: Tue Oct 10, 2006 2:13 pm
by patrickrho
is ragdoll going to be worked on? or its not even in ur milestone :lol: :lol:

Posted: Tue Oct 10, 2006 2:52 pm
by Nick_Japan
Well, I feel that ragdolls are a fun feature of physics engines, but not an integral part of a game. I want to get IPhysics to the state where it supports all the necessary features required to make a game. My rough roadmap is:

1) Character control
2) Flesh out primitives, add convex hulls
3) Compound objects (CSG)
4) Joints (hinges etc)
5) Anything else that people actually need
6) Ragdolls, liquid/buoyancy and Other Cool Stuff

So sorry, no ragdolls for the time being, but you can still make a start without them!

Posted: Tue Oct 10, 2006 4:10 pm
by jacky
yes, i can agree in this point:
character control, joints and other stuff is really needed.

Posted: Tue Oct 10, 2006 9:03 pm
by Coolkat88
looks like a nice list you got going there.. just one question though.. is there any sorta ETA on character controls? i want to be able to test it out with my current game rather then just in examples.. since my game doesn't use cars.. ;'( .. but i can't wait to try this out.

Posted: Wed Oct 11, 2006 4:13 pm
by twentytortures
Yeah i eventually figured out that i should call the set target during the loop rather then before hahaha. I post these things and then figure them out shortly therafter. I'm somewhat stupid.

Posted: Wed Oct 11, 2006 4:53 pm
by Nick_Japan
Regarding the character controller, I'm hoping to have a go this weekend, but I'm not promising anything. While theoretically it shouldn't take too long as there are already some good implementations out there, I've never actually made one myself before, so there's a degree of the unknown about it. I do realise though without character control it's nice but not terribly useful, so it gets priority!

Posted: Wed Oct 11, 2006 4:55 pm
by Coolkat88
alright.. well good luck with it nick!

Posted: Sat Oct 14, 2006 10:34 am
by klikmaster
Hey, I'm liking IPhysics so far! I've got my car physics working, but I got a problem with my level entity.

Code: Select all

    IAnimatedMesh* map = smgr->getMesh("data/map.my3d");
    ISceneNode* mapNode = smgr->addOctTreeSceneNode(map->getMesh(0));
    
    ITriangleSelector* selector = 0;  
    
    if (mapNode)
	{		
		mapNode->setPosition(vector3df(0,0,0));
		mapNode->setScale(vector3df(4,4,4));
        mapNode->setDebugDataVisible(true);
        
        //mapNode->setMaterialFlag(EMF_FOG_ENABLE,true);	
   	    mapNode->setMaterialFlag(video::EMF_LIGHTING, false);	     
              

		selector = smgr->createOctTreeTriangleSelector(map->getMesh(0), mapNode, 128);
		mapNode->setTriangleSelector(selector);
		selector->drop();
	}
    //driver->setFog(video::SColor(255, 255, 255, 255), true, 800.f, 3000.f, .005f, false, true);	
    
	SPhysicsStaticMesh level;
	level.mesh = map;
	level.meshnode = mapNode;
	level.meshScale = vector3df(4, 4, 4);
	level.meshnode->setScale(level.meshScale);
    IPhysicsEntity* levelEntity = physics.addEntity(&level);
It compiles, but when I run it, it crashes. It seems to be the levelEntity causing it to crash.

Posted: Sun Oct 15, 2006 5:10 pm
by Nick_Japan
@klikmaster: Does Irrlicht successfully load your mesh? If that's not the problem, it could possibly be that IPhysics is using the wrong vertex type, although I added support for all of them. What kind of mesh is your map.my3d? Are there lightmaps or any other FX like that? How big is it? IPhysics currently just uses Irrlicht defaults, so still 16 bit indices.

Posted: Sun Oct 15, 2006 5:21 pm
by klikmaster
Irrlicht opens the map fine, I only got problems after making an entity from my level. There are no FX/lightmaps etc. Just your standard textured mesh.

Your level.meshnode is defined as an IAnimatedMeshSceneNode, mine is an ISceneNode, does that pose a problem?