IPhysics - Newton/Irrlicht framework
-
- Posts: 98
- Joined: Mon Dec 13, 2004 11:47 am
- Location: Japan
-
- Posts: 41
- Joined: Thu Sep 28, 2006 4:34 am
- Location: Eaton, Colorado, United States
-
- Posts: 98
- Joined: Mon Dec 13, 2004 11:47 am
- Location: 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:
@patrickrho: No ragdolls yet - they're a little way off
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
-
- Posts: 322
- Joined: Tue Aug 30, 2005 10:34 am
- Location: slovakia
-
- Posts: 4
- Joined: Mon Oct 09, 2006 9:26 pm
-
- Posts: 98
- Joined: Mon Dec 13, 2004 11:47 am
- Location: 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!
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!
-
- Posts: 41
- Joined: Thu Sep 28, 2006 4:34 am
- Location: Eaton, Colorado, United States
-
- Posts: 98
- Joined: Mon Dec 13, 2004 11:47 am
- Location: 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!
-
- Posts: 40
- Joined: Mon Sep 11, 2006 1:06 pm
Hey, I'm liking IPhysics so far! I've got my car physics working, but I got a problem with my level entity.
It compiles, but when I run it, it crashes. It seems to be the levelEntity causing it to crash.
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);
~IRRLICHT ROX MY SOX~
-
- Posts: 98
- Joined: Mon Dec 13, 2004 11:47 am
- Location: 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.
-
- Posts: 40
- Joined: Mon Sep 11, 2006 1:06 pm