IPhysics - Newton/Irrlicht framework

Announce new projects or updates of Irrlicht Engine related tools, games, and applications.
Also check the Wiki
Nick_Japan
Posts: 98
Joined: Mon Dec 13, 2004 11:47 am
Location: Japan

Post by Nick_Japan »

Uploaded, cheers! You can now get it from the download page.
Image Image
twentytortures
Posts: 41
Joined: Thu Sep 28, 2006 4:34 am
Location: Eaton, Colorado, United States

Post 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.
patrickrho
Posts: 4
Joined: Mon Oct 09, 2006 9:26 pm

Post by patrickrho »

is ragdoll possible with this?
Nick_Japan
Posts: 98
Joined: Mon Dec 13, 2004 11:47 am
Location: Japan

Post 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
Image Image
needforhint
Posts: 322
Joined: Tue Aug 30, 2005 10:34 am
Location: slovakia

Post by needforhint »

WoW, I just got to this thread, and yeah.
Cool stuff, I am just through the download, see ya, vzzzzrch
what is this thing...
patrickrho
Posts: 4
Joined: Mon Oct 09, 2006 9:26 pm

Post by patrickrho »

is ragdoll going to be worked on? or its not even in ur milestone :lol: :lol:
Nick_Japan
Posts: 98
Joined: Mon Dec 13, 2004 11:47 am
Location: Japan

Post 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!
Image Image
jacky
Posts: 13
Joined: Wed Oct 04, 2006 7:08 pm

Post by jacky »

yes, i can agree in this point:
character control, joints and other stuff is really needed.
Coolkat88
Posts: 30
Joined: Tue Oct 03, 2006 3:14 pm

Post 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.
twentytortures
Posts: 41
Joined: Thu Sep 28, 2006 4:34 am
Location: Eaton, Colorado, United States

Post 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.
Nick_Japan
Posts: 98
Joined: Mon Dec 13, 2004 11:47 am
Location: Japan

Post 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!
Image Image
Coolkat88
Posts: 30
Joined: Tue Oct 03, 2006 3:14 pm

Post by Coolkat88 »

alright.. well good luck with it nick!
klikmaster
Posts: 40
Joined: Mon Sep 11, 2006 1:06 pm

Post 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.
~IRRLICHT ROX MY SOX~
Nick_Japan
Posts: 98
Joined: Mon Dec 13, 2004 11:47 am
Location: Japan

Post 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.
Image Image
klikmaster
Posts: 40
Joined: Mon Sep 11, 2006 1:06 pm

Post 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?
~IRRLICHT ROX MY SOX~
Post Reply