.\IrrNewt_src\ragdoll.cpp(193) : error C2440: 'Initialisierung': 'irr::core::list<T>::ConstIterator' can not be converted to 'irr::core::list<T>::Iterator'
Then another question: can I disable an object (IVehicleTire) or freeze it, so that the World don't calculate any physics for this object until I enable it? Or have I to destroy it and to recreate it?
Yeah well i compiled irrNewt finally on my new development machine and threw the new dll into the mix and im having new problems, with your character controller i think!
On my P3 800 the character moves and walks fine, on my 3.3 ghz its choppy and almost dosen't move at all. not framerate, but actual character movement.
I would think it has something to do with framerate independence but i use the code from your example to do so:
//CHARACTER CONTROLLING
core::vector3df rigell_rotation = node->getRotation();
//STEP 1: ROTATING
//make node rotation frame rate indipendent by multiply it by time elasped from last update
float rotation_to_apply = rotation_speed * fact->p_world->getTimeElapsed();
if(right)
rigell_rotation.Y+=rotation_to_apply;
if(left)
rigell_rotation.Y-=rotation_to_apply;
node->setRotation(rigell_rotation);
//STEP 2: MOVING
core::vector3df velocity = charcontrol->getVelocity();
velocity.X=velocity.Z=0;
if(up) //without FRI in function name the movement is not frame rate indipendent
velocity += charcontrol->FRIgetDirectionPositionY(core::vector3df(rigell_speed,0,0));
if(down)
velocity += charcontrol->FRIgetDirectionPositionY(core::vector3df(-rigell_speed,0,0));
charcontrol->setVelocity(velocity);
I think I've found a bug in IrrNewt 0.4. When I add an object, which has some relative position to another, then the Newton body shows up in very different position than the node itself (it seems that Newton interprets the relative position as absolute one).
I almost managed to fix it, but my fix works only when scales of parent body and relative body are the same - if not, then body shows up in slightly wrong position.
Could you find out how to fix this bug, please? I'm not familiar with Irrlicht transformation matrixes...
.\IrrNewt_src\ragdoll.cpp(193) : error C2440: 'Initialisierung': 'irr::core::list<T>::ConstIterator' can not be converted to 'irr::core::list<T>::Iterator'
the other errors are all solved
i had this problem too when compiled for 1.4. you need to change iterator to constiterator in the ragdoll.cpp
const list<ISceneNode*>& children = BoneNode->getChildren();
for (list<ISceneNode*>::ConstIterator it = children.begin(); it != children.end(); ++it) {
Then another question: can I disable an object (IVehicleTire) or freeze it, so that the World don't calculate any physics for this object until I enable it? Or have I to destroy it and to recreate it?
if you don't call setAutoFreeze(false) the body is automatically freezed if it doesn't move. BTW to freeze it manually call setFreeze(true) on the chassis
stevend wrote:Yeah well i compiled irrNewt finally on my new development machine and threw the new dll into the mix and im having new problems, with your character controller i think!
On my P3 800 the character moves and walks fine, on my 3.3 ghz its choppy and almost dosen't move at all. not framerate, but actual character movement.
I would think it has something to do with framerate independence but i use the code from your example to do so:
//CHARACTER CONTROLLING
core::vector3df rigell_rotation = node->getRotation();
//STEP 1: ROTATING
//make node rotation frame rate indipendent by multiply it by time elasped from last update
float rotation_to_apply = rotation_speed * fact->p_world->getTimeElapsed();
if(right)
rigell_rotation.Y+=rotation_to_apply;
if(left)
rigell_rotation.Y-=rotation_to_apply;
node->setRotation(rigell_rotation);
//STEP 2: MOVING
core::vector3df velocity = charcontrol->getVelocity();
velocity.X=velocity.Z=0;
if(up) //without FRI in function name the movement is not frame rate indipendent
velocity += charcontrol->FRIgetDirectionPositionY(core::vector3df(rigell_speed,0,0));
if(down)
velocity += charcontrol->FRIgetDirectionPositionY(core::vector3df(-rigell_speed,0,0));
charcontrol->setVelocity(velocity);
any ideas?
Short reply: no
First of all: try the character controller example as it on your 3.3 ghz and see if it works. why are you sure it is not the framerate? BTW i have an AMD athlon 2600+ and it works.
matgaw wrote:Hi white tiger! Glad to see you back!
me too
matgaw wrote:I think I've found a bug in IrrNewt 0.4. When I add an object, which has some relative position to another, then the Newton body shows up in very different position than the node itself (it seems that Newton interprets the relative position as absolute one).
I almost managed to fix it, but my fix works only when scales of parent body and relative body are the same - if not, then body shows up in slightly wrong position.
Could you find out how to fix this bug, please? I'm not familiar with Irrlicht transformation matrixes...
can you post your fix, a code that show the bug (with different scales) and upload the mesh you are using, please? i can't debug whitout these
I have downloaded this newton package,and created a scene with a large
IMesh(including sveral meshbuffer),and I used this IMesh as terrain. and then, I created a FPS camera to collision with terrain,the result is very strange:
1. when I create this IMesh as EBT_TERRAIN,then my computer will restarted.
2. when I created this IMesh as EBT_CONVEX_HULL,then terrain no any effect fpor FPS camera.
I don't know why this happened,because most physics code is copied from irrnewt_sdk_v0.4.
oh, I have recompiled this v0.4 SDK for irrlicht 1.4,and tested all samples come from irrnewt sdk, it's all OK.
currently,the main problem is how to create a terrain that represented by IMesh with several meshbuffer?
IMesh *terrainMesh=createMyTerrainMesh(...);
IMeshSceneNode *terrainNode=mgr->addMeshSceneNode(terrainMesh);
irr::newton::SBodyFromNode terrainData;
terrainData.Node=terrainNode;
<How to set other arguments for terrainData? >
IBody *terrainBody=p_world->createBody(terrainData);
... ...
Excuse me, I just download irrNewt from http://aresfps.sourceforge.net/irrnewt.htm
I tried to compile an example in irrNewt SDK, but it's not successful. The error message is "Cannot open include file: 'newton.h': No such file or directory". I tried to find newton.h in all directories of irrNewt SDK. Maybe the author forgot export this file into SDK. Anybody has this file, please help me. You can copy and paste this file into Reply. Thank you very much.
analize999 wrote:But where does the newton game dynamics sdk? In the tiger's web just only has irrNewt SDK. Would you like to give me this link?
Newton Game Dynamics (NGD) is not belongs to Irrlicht so you have to download it separately at http://www.newtondynamics.com irrNewt is just a wrapper for NGD and irrlicht.
you can actually find the answer in a second with google.