IrrPhysx 0.2 - Nvidia Physx 2.8.1 wrapper
i tried to fix the bug with the terrain ... i made a irr scene with just a terrain and skybox and light and it worked perfect.
it is possible that physX have a limitation for objects at hardware render?
EDIT:
I added the terrain behinde the light at the scene.irr. Now it work with the whole scene. Have anybody a idea why?
it is possible that physX have a limitation for objects at hardware render?
EDIT:
I added the terrain behinde the light at the scene.irr. Now it work with the whole scene. Have anybody a idea why?
very well... after installing everything, adding lots of include paths and library paths, manually editing the GameExample.vcproj compiling and lots of other stuff, it now compiles on my Microsoft Visual C++ 2005 Express Edition...
I've been trying to find an acceptable character controller with an acceptable physics engine for irrlicht in the last couple of days and at least irrphysx seems to be faster than irrnewt... I've got this somehow stuttering performance with irrnewt animating a capsule with FRIgetDirectionPositionY(core::vector3df(0,0,rigell_speed)) ... dont know why.. well at least its a capsule and not a sphere which leads me to my question... I've read the following:
btw.
the svn version of irrlicht uses 7 arguments for drawVertexPrimitiveList, the last one is irr::video::E_INDEX_TYPE so I changed CDebugRenderer.cpp in line 78 from:
to
I've been trying to find an acceptable character controller with an acceptable physics engine for irrlicht in the last couple of days and at least irrphysx seems to be faster than irrnewt... I've got this somehow stuttering performance with irrnewt animating a capsule with FRIgetDirectionPositionY(core::vector3df(0,0,rigell_speed)) ... dont know why.. well at least its a capsule and not a sphere which leads me to my question... I've read the following:
when will that happen ? or is there an updated version somewhere around... right now when I touch the cursor up key... my character sphere flies high speed outside of the terrain... cant really move, its way to fast... any ideas ?// Create an FPS camera so we can see the scene and easily move around
// Link it up to a Physx sphere object for collision and gravitational purposes
// Once character controllers are supported by IrrPhysx this will be updated
btw.
the svn version of irrlicht uses 7 arguments for drawVertexPrimitiveList, the last one is irr::video::E_INDEX_TYPE so I changed CDebugRenderer.cpp in line 78 from:
Code: Select all
if (indexIndex >= 65530) { // 66536 index limit so before we reach it fire off a render and reset to zero
driver->drawVertexPrimitiveList(pVertList, vertIndex, pIndexList, indexIndex / 2, video::EVT_STANDARD, scene::EPT_LINES);
indexIndex = 0;
vertIndex = 0;
}
Code: Select all
if (indexIndex >= 65530) { // 66536 index limit so before we reach it fire off a render and reset to zero
driver->drawVertexPrimitiveList(pVertList, vertIndex, pIndexList, indexIndex / 2, video::EVT_STANDARD, scene::EPT_LINES, irr::video::E_INDEX_TYPE::EIT_16BIT);
indexIndex = 0;
vertIndex = 0;
}
ok, it moves at a normal speed now. I didnt realize you're actually using the normal for moving the camera... adjusting the move speed parameter from 100 to 0.1 fixed my problem... now I should exchange the sphere for a capsule and things should look nicer...
Code: Select all
camera = smgr->addCameraSceneNodeFPS(NULL, 100, 0.1, -1, NULL, 0, true);
Is that with Irr 1.5? The camera params changed in 1.5 under the hood so projects have to update what they're passing.
I don't know when the character controller stuff will be added to IrrPhysx... can't guarantee anything i'm afraid! I'm currently getting IrrAI 0.5 ready for release which should be done by mid January and then after that i may do IrrPhysx 0.3 and try getting the character controller into that.
I don't know when the character controller stuff will be added to IrrPhysx... can't guarantee anything i'm afraid! I'm currently getting IrrAI 0.5 ready for release which should be done by mid January and then after that i may do IrrPhysx 0.3 and try getting the character controller into that.
yes its 1.5... well I changed the sphere for a capsule now and made sure it stays upright... looks quite fine... thanks for all the work...
Code: Select all
cameraPair->PhysxObject = physxManager->createCapsuleObject(pos, core::vector3df(0,0,0), 5.0f, 10.0f, 1000.0f, 0);
Code: Select all
//...code before
while (device->run()) {
//...code between
// Update the camera pair too as we've not added that to the objects array
cameraPair->updateTransformation();
// Make sure the capsule stays upright
cameraPair->PhysxObject->setRotation(core::vector3df(0,0,0));
// Begin the render process
driver->beginScene(true, true, video::SColor(225,120,120,120));
// Render the scene
smgr->drawAll();
// Render Physx debug data
physxManager->renderDebugData(video::SColor(225,255,255,255));
// Render the GUI
guienv->drawAll();
// Finish the render process
driver->endScene();
}
hmm I've question here. is there any way to make a character to walk on a platform which isn't flat? I mean something like
My company: http://www.kloena.com
My blog: http://www.zhieng.com
My co-working space: http://www.deskspace.info
My blog: http://www.zhieng.com
My co-working space: http://www.deskspace.info
-
- Posts: 368
- Joined: Tue Aug 21, 2007 1:43 am
- Location: The Middle of Nowhere
I don't know whether forcefields would be the right path to take.. but having said that i've not looked at forcefields much!
I think Dorth's suggestions of just changing the gravity as necessary would probably work fine... What you could do (with the current version of IrrPhysx) is raycast down from your player and get the normal of the surface he's on and then change the whole physics scene's gravity to the negative of that...
Actually that wouldn't work... because then any loose objects placed elsewhere would be affected by this change so might fall off other sections of the map...
I think Dorth's suggestions of just changing the gravity as necessary would probably work fine... What you could do (with the current version of IrrPhysx) is raycast down from your player and get the normal of the surface he's on and then change the whole physics scene's gravity to the negative of that...
Actually that wouldn't work... because then any loose objects placed elsewhere would be affected by this change so might fall off other sections of the map...
well changing the entire scene's gravity would affect everything, that's the problem so collision groups or walkable parts aren't the problem, that would be to do with raycasting the surface being walked on.
i suppose you could just create your camera controller in a way that it's not affected by any gravity and you just apply the gravity as necessary yourself... the same would have to go with all other objects too... just have a zero-g environment as far as Physx is concerned and then you apply gravity per object yourself by setting the linear velocity....
i suppose you could just create your camera controller in a way that it's not affected by any gravity and you just apply the gravity as necessary yourself... the same would have to go with all other objects too... just have a zero-g environment as far as Physx is concerned and then you apply gravity per object yourself by setting the linear velocity....
@ Virion
psychonauts, one of my favourite games... In that screeny we're in the mind of a paranoid security guard if I'm not mistaken.
well I think gravity would be the absolute wrong way to tackel that kind of problem but each face or polygon on the walkable areas has a face normal whose vector can easily be calculated and always points in character orientation and jumping direction... all you have to do is make sure your character stays in that orientation, stuck to the ground except when jumping...
well, correct myself maybe you could just set gravity to the opposite vector frame for frame... dunno
psychonauts, one of my favourite games... In that screeny we're in the mind of a paranoid security guard if I'm not mistaken.
well I think gravity would be the absolute wrong way to tackel that kind of problem but each face or polygon on the walkable areas has a face normal whose vector can easily be calculated and always points in character orientation and jumping direction... all you have to do is make sure your character stays in that orientation, stuck to the ground except when jumping...
well, correct myself maybe you could just set gravity to the opposite vector frame for frame... dunno