Hello Jack000
This is a while I am trying to find an easy to use car physics and I found IPhysics is the best one. But the problem is it is so old and and needs re-compiling for new Irrlicht. Also it needs old Newton, I mean 1.5.3. I tried to modify the original IPhysics (1.2) to work with Irrlicht 1.7.2 and Newton 1.5.3. I had success but there is one little problem: the wheels are located a little out-place and I don't know why this happens. Then I found IPhysics_1.5_Irr_1.3 which seems is modified and recompiled for Irrlicht 1.3 and Newton 1.5.3. Again I want to use new Irrlicht (1.7.2) not that old one because it doesn't support Joystick. My first try to recompile it was unsuccessful and it seems there is alot different between IPhysics 1.2 and 1.5. Actually I don't like the 1.5 version I prefer to renew the original version. Now I found that you made another version compatible with Irrlicht 1.6. I am really interested to take a look at it and please let me know how that is possible. Also any comment on this is really appreciated.
IPhysics - Newton/Irrlicht framework
-
- Posts: 23
- Joined: Sat Apr 03, 2010 3:44 am
Iphy
I'm using Irrlicht 1.7.2 and Newton 2.32 and every time I try to compile in Code::Blocks using the Gcc compiler on Windows 7 I get this error:
Does anyone have any solutions?
Code: Select all
C:\Users\washkord\Desktop\SDK\IPhysics-1.2\examples\examples_source\example3.h||In function 'void runExample3()':|
C:\Users\washkord\Desktop\SDK\IPhysics-1.2\examples\examples_source\example3.h|156|error: cannot declare variable 'receiver' to be of abstract type 'CEventReceiver_eg3'|
C:\Users\washkord\Desktop\SDK\IPhysics-1.2\examples\examples_source\example3.h|8|note: because the following virtual functions are pure within 'CEventReceiver_eg3':|
C:\Users\washkord\Desktop\SDK\irrlicht-1.7.2\include\IEventReceiver.h|445|note: virtual bool irr::IEventReceiver::OnEvent(const irr::SEvent&)|
||=== Build finished: 1 errors, 0 warnings ===|
it is old, and irrlicht has changed OnEvent function so in the event receiver it should be:
Code: Select all
MyReceiver::OnEvent(const irr::SEvent&event){///handle events here}
Working on game: Marrbles (Currently stopped).
I'm not, I haven't used newton much, only with simple things and I didn't really like it much.newleon wrote:Hi serengeor
It seems you are pro in this matter. Do you have any comment on my problem mentioned in previous post? Thanks in advance.
Maybe someone needs to write a new wrapper for newton Though I prefer bullet physics which doesn't even need a wrapper(at least for me)
Working on game: Marrbles (Currently stopped).
Re: IPhysics - Newton/Irrlicht framework
I had this problem whether I try to fix and re-compile the original IPhysics or use the one given by "icaro56". The wheels are positioned in wrong place related to the chassis.
The car data I used is as follows:
Has anyone any suggestion how to fix this?
The car data I used is as follows:
Code: Select all
carData.carBodyOffset = vector3df(0.0f, 0.0f, 0.0f);
carData.carBodySize = vector3df(4.794f, 2.024f, 1.343f);
carData.carMass = 5000.0f;
carData.frontAxleOffset = 1.579f;
carData.rearAxleOffset = 1.179f;
carData.axleWidth = 0.9f*2.024f;
carData.tireMass = 100.0f;
carData.tireRadius = 0.98f; //0.98
carData.tireWidth = 1.0f; //1.0
carData.maxSteerAngle = 0.6f;
carData.maxTorque = 5000.0f;
carData.maxBrakes = 50.0f;
carData.tireSuspensionLength = 0.20f;
carData.tireSuspensionSpring = (carData.tireMass * 1.0f * 9.8f) / carData.tireSuspensionLength;
carData.tireSuspensionShock = sqrt(carData.tireSuspensionSpring) * 1.0f;
Re: IPhysics - Newton/Irrlicht framework
One slight issue with the version icaro56 posted.
When running the Example3 demo, the car seems to stutter a bit after every few seconds.
No idea why. The source is the same as the old version.
--Edit: Seems to be an issue with getAbsolutePosition when aiming the camera at it. If I use getPosition instead, it doesn't stutter.
When running the Example3 demo, the car seems to stutter a bit after every few seconds.
No idea why. The source is the same as the old version.
--Edit: Seems to be an issue with getAbsolutePosition when aiming the camera at it. If I use getPosition instead, it doesn't stutter.
Re: IPhysics - Newton/Irrlicht framework
I like this physics becouse it's simple but I get alot of errors:
C:\Users\Stijn\Documents\Irrlicht\IPhysics-1.2\include\PhysicsGlobal.h|12|error: Newton.h: No such file or directory|
C:\Users\Stijn\Documents\Irrlicht\IPhysics-1.2\include\IPhysicsBaseEntity.h|25|error: ISO C++ forbids declaration of 'NewtonBody' with no type|
C:\Users\Stijn\Documents\Irrlicht\IPhysics-1.2\include\IPhysicsBaseEntity.h|25|error: 'NewtonBody' declared as a 'virtual' field|
C:\Users\Stijn\Documents\Irrlicht\IPhysics-1.2\include\IPhysicsBaseEntity.h|25|error: expected ';' before '*' token|
C:\Users\Stijn\Documents\Irrlicht\IPhysics-1.2\include\IPhysicsEntity.h|25|error: ISO C++ forbids declaration of 'NewtonBody' with no type|
C:\Users\Stijn\Documents\Irrlicht\IPhysics-1.2\include\IPhysicsEntity.h|25|error: 'NewtonBody' declared as a 'virtual' field|
C:\Users\Stijn\Documents\Irrlicht\IPhysics-1.2\include\IPhysicsEntity.h|25|error: expected ';' before '*' token|
C:\Users\Stijn\Documents\Irrlicht\IPhysics-1.2\include\CPhysicsEntity.h|16|error: 'NewtonBody' has not been declared|
C:\Users\Stijn\Documents\Irrlicht\IPhysics-1.2\include\CPhysicsEntity.h|21|error: ISO C++ forbids declaration of 'NewtonBody' with no type|
C:\Users\Stijn\Documents\Irrlicht\IPhysics-1.2\include\CPhysicsEntity.h|21|error: expected ';' before '*' token|
C:\Users\Stijn\Documents\Irrlicht\IPhysics-1.2\include\CPhysicsEntity.h|25|error: ISO C++ forbids declaration of 'NewtonBody' with no type|
C:\Users\Stijn\Documents\Irrlicht\IPhysics-1.2\include\CPhysicsEntity.h|25|error: expected ';' before '*' token|
C:\Users\Stijn\Documents\Irrlicht\IPhysics-1.2\include\MPhysicsCallbacks.h|7|error: ISO C++ forbids declaration of 'NewtonBody' with no type|
C:\Users\Stijn\Documents\Irrlicht\IPhysics-1.2\include\MPhysicsCallbacks.h|7|error: expected ',' or '...' before '*' token|
C:\Users\Stijn\Documents\Irrlicht\IPhysics-1.2\include\MPhysicsCallbacks.h|9|error: ISO C++ forbids declaration of 'NewtonBody' with no type|
C:\Users\Stijn\Documents\Irrlicht\IPhysics-1.2\include\MPhysicsCallbacks.h|9|error: expected ',' or '...' before '*' token|
C:\Users\Stijn\Documents\Irrlicht\IPhysics-1.2\include\CPhysicsCarWheel.h|9|error: ISO C++ forbids declaration of 'NewtonJoint' with no type|
C:\Users\Stijn\Documents\Irrlicht\IPhysics-1.2\include\CPhysicsCarWheel.h|9|error: expected ',' or '...' before '*' token|
C:\Users\Stijn\Documents\Irrlicht\IPhysics-1.2\include\CPhysicsCarWheel.h|18|error: 'NewtonJoint' has not been declared|
C:\Users\Stijn\Documents\Irrlicht\IPhysics-1.2\include\CPhysicsCarWheel.h|19|error: ISO C++ forbids declaration of 'NewtonJoint' with no type|
C:\Users\Stijn\Documents\Irrlicht\IPhysics-1.2\include\CPhysicsCarWheel.h|19|error: expected ',' or '...' before '*' token|
C:\Users\Stijn\Documents\Irrlicht\IPhysics-1.2\include\MPhysicsCallbacks.h|7|error: ISO C++ forbids declaration of 'NewtonBody' with no type|
C:\Users\Stijn\Documents\Irrlicht\IPhysics-1.2\include\MPhysicsCallbacks.h|7|error: expected ',' or '...' before '*' token|
C:\Users\Stijn\Documents\Irrlicht\IPhysics-1.2\include\MPhysicsCallbacks.h|9|error: ISO C++ forbids declaration of 'NewtonBody' with no type|
C:\Users\Stijn\Documents\Irrlicht\IPhysics-1.2\include\MPhysicsCallbacks.h|9|error: expected ',' or '...' before '*' token|
C:\Users\Stijn\Documents\Irrlicht\IPhysics-1.2\include\IPhysicsCar.h|26|error: ISO C++ forbids declaration of 'NewtonBody' with no type|
C:\Users\Stijn\Documents\Irrlicht\IPhysics-1.2\include\IPhysicsCar.h|26|error: 'NewtonBody' declared as a 'virtual' field|
C:\Users\Stijn\Documents\Irrlicht\IPhysics-1.2\include\IPhysicsCar.h|26|error: expected ';' before '*' token|
C:\Users\Stijn\Documents\Irrlicht\IPhysics-1.2\include\CPhysicsCar.h|30|error: 'NewtonWorld' has not been declared|
C:\Users\Stijn\Documents\Irrlicht\IPhysics-1.2\include\CPhysicsCar.h|45|error: ISO C++ forbids declaration of 'NewtonJoint' with no type|
C:\Users\Stijn\Documents\Irrlicht\IPhysics-1.2\include\CPhysicsCar.h|45|error: expected ';' before '*' token|
C:\Users\Stijn\Documents\Irrlicht\IPhysics-1.2\include\CPhysicsCar.h|54|error: ISO C++ forbids declaration of 'NewtonBody' with no type|
C:\Users\Stijn\Documents\Irrlicht\IPhysics-1.2\include\CPhysicsCar.h|54|error: expected ';' before '*' token|
C:\Users\Stijn\Documents\Irrlicht\IPhysics-1.2\include\CPhysicsCar.h|61|error: ISO C++ forbids declaration of 'NewtonBody' with no type|
C:\Users\Stijn\Documents\Irrlicht\IPhysics-1.2\include\CPhysicsCar.h|61|error: expected ';' before '*' token|
C:\Users\Stijn\Documents\Irrlicht\IPhysics-1.2\include\CPhysicsCar.h|62|error: ISO C++ forbids declaration of 'NewtonJoint' with no type|
C:\Users\Stijn\Documents\Irrlicht\IPhysics-1.2\include\CPhysicsCar.h|62|error: expected ';' before '*' token|
C:\Users\Stijn\Documents\Irrlicht\IPhysics-1.2\include\CPhysics.h|33|error: ISO C++ forbids declaration of 'NewtonWorld' with no type|
C:\Users\Stijn\Documents\Irrlicht\IPhysics-1.2\include\CPhysics.h|33|error: expected ';' before '*' token|
C:\Users\Stijn\Documents\Irrlicht\IPhysics-1.2\include\CPhysics.h|47|error: expected ';' before '(' token|
C:\Users\Stijn\Documents\Irrlicht\IPhysics-1.2\include\CPhysics.h|48|error: 'NewtonCollision' has not been declared|
C:\Users\Stijn\Documents\Irrlicht\IPhysics-1.2\include\CPhysics.h|49|error: 'NewtonCollision' has not been declared|
C:\Users\Stijn\Documents\Irrlicht\IPhysics-1.2\include\CPhysics.h|50|error: 'NewtonCollision' has not been declared|
C:\Users\Stijn\Documents\Irrlicht\IPhysics-1.2\include\CPhysics.h|51|error: ISO C++ forbids declaration of 'NewtonWorld' with no type|
C:\Users\Stijn\Documents\Irrlicht\IPhysics-1.2\include\CPhysics.h|51|error: expected ';' before '*' token|
||=== Build finished: 45 errors, 0 warnings ===|
I downloaded icaro56 his version included the Iphysics.lib and let in search in \include and put this at the start of my program:
#include <IPhysics.h>
#pragma comment(lib, "IPhysics.lib")
Thing is I don't have a newton.h file and neither was is in the original or icario his
C:\Users\Stijn\Documents\Irrlicht\IPhysics-1.2\include\PhysicsGlobal.h|12|error: Newton.h: No such file or directory|
C:\Users\Stijn\Documents\Irrlicht\IPhysics-1.2\include\IPhysicsBaseEntity.h|25|error: ISO C++ forbids declaration of 'NewtonBody' with no type|
C:\Users\Stijn\Documents\Irrlicht\IPhysics-1.2\include\IPhysicsBaseEntity.h|25|error: 'NewtonBody' declared as a 'virtual' field|
C:\Users\Stijn\Documents\Irrlicht\IPhysics-1.2\include\IPhysicsBaseEntity.h|25|error: expected ';' before '*' token|
C:\Users\Stijn\Documents\Irrlicht\IPhysics-1.2\include\IPhysicsEntity.h|25|error: ISO C++ forbids declaration of 'NewtonBody' with no type|
C:\Users\Stijn\Documents\Irrlicht\IPhysics-1.2\include\IPhysicsEntity.h|25|error: 'NewtonBody' declared as a 'virtual' field|
C:\Users\Stijn\Documents\Irrlicht\IPhysics-1.2\include\IPhysicsEntity.h|25|error: expected ';' before '*' token|
C:\Users\Stijn\Documents\Irrlicht\IPhysics-1.2\include\CPhysicsEntity.h|16|error: 'NewtonBody' has not been declared|
C:\Users\Stijn\Documents\Irrlicht\IPhysics-1.2\include\CPhysicsEntity.h|21|error: ISO C++ forbids declaration of 'NewtonBody' with no type|
C:\Users\Stijn\Documents\Irrlicht\IPhysics-1.2\include\CPhysicsEntity.h|21|error: expected ';' before '*' token|
C:\Users\Stijn\Documents\Irrlicht\IPhysics-1.2\include\CPhysicsEntity.h|25|error: ISO C++ forbids declaration of 'NewtonBody' with no type|
C:\Users\Stijn\Documents\Irrlicht\IPhysics-1.2\include\CPhysicsEntity.h|25|error: expected ';' before '*' token|
C:\Users\Stijn\Documents\Irrlicht\IPhysics-1.2\include\MPhysicsCallbacks.h|7|error: ISO C++ forbids declaration of 'NewtonBody' with no type|
C:\Users\Stijn\Documents\Irrlicht\IPhysics-1.2\include\MPhysicsCallbacks.h|7|error: expected ',' or '...' before '*' token|
C:\Users\Stijn\Documents\Irrlicht\IPhysics-1.2\include\MPhysicsCallbacks.h|9|error: ISO C++ forbids declaration of 'NewtonBody' with no type|
C:\Users\Stijn\Documents\Irrlicht\IPhysics-1.2\include\MPhysicsCallbacks.h|9|error: expected ',' or '...' before '*' token|
C:\Users\Stijn\Documents\Irrlicht\IPhysics-1.2\include\CPhysicsCarWheel.h|9|error: ISO C++ forbids declaration of 'NewtonJoint' with no type|
C:\Users\Stijn\Documents\Irrlicht\IPhysics-1.2\include\CPhysicsCarWheel.h|9|error: expected ',' or '...' before '*' token|
C:\Users\Stijn\Documents\Irrlicht\IPhysics-1.2\include\CPhysicsCarWheel.h|18|error: 'NewtonJoint' has not been declared|
C:\Users\Stijn\Documents\Irrlicht\IPhysics-1.2\include\CPhysicsCarWheel.h|19|error: ISO C++ forbids declaration of 'NewtonJoint' with no type|
C:\Users\Stijn\Documents\Irrlicht\IPhysics-1.2\include\CPhysicsCarWheel.h|19|error: expected ',' or '...' before '*' token|
C:\Users\Stijn\Documents\Irrlicht\IPhysics-1.2\include\MPhysicsCallbacks.h|7|error: ISO C++ forbids declaration of 'NewtonBody' with no type|
C:\Users\Stijn\Documents\Irrlicht\IPhysics-1.2\include\MPhysicsCallbacks.h|7|error: expected ',' or '...' before '*' token|
C:\Users\Stijn\Documents\Irrlicht\IPhysics-1.2\include\MPhysicsCallbacks.h|9|error: ISO C++ forbids declaration of 'NewtonBody' with no type|
C:\Users\Stijn\Documents\Irrlicht\IPhysics-1.2\include\MPhysicsCallbacks.h|9|error: expected ',' or '...' before '*' token|
C:\Users\Stijn\Documents\Irrlicht\IPhysics-1.2\include\IPhysicsCar.h|26|error: ISO C++ forbids declaration of 'NewtonBody' with no type|
C:\Users\Stijn\Documents\Irrlicht\IPhysics-1.2\include\IPhysicsCar.h|26|error: 'NewtonBody' declared as a 'virtual' field|
C:\Users\Stijn\Documents\Irrlicht\IPhysics-1.2\include\IPhysicsCar.h|26|error: expected ';' before '*' token|
C:\Users\Stijn\Documents\Irrlicht\IPhysics-1.2\include\CPhysicsCar.h|30|error: 'NewtonWorld' has not been declared|
C:\Users\Stijn\Documents\Irrlicht\IPhysics-1.2\include\CPhysicsCar.h|45|error: ISO C++ forbids declaration of 'NewtonJoint' with no type|
C:\Users\Stijn\Documents\Irrlicht\IPhysics-1.2\include\CPhysicsCar.h|45|error: expected ';' before '*' token|
C:\Users\Stijn\Documents\Irrlicht\IPhysics-1.2\include\CPhysicsCar.h|54|error: ISO C++ forbids declaration of 'NewtonBody' with no type|
C:\Users\Stijn\Documents\Irrlicht\IPhysics-1.2\include\CPhysicsCar.h|54|error: expected ';' before '*' token|
C:\Users\Stijn\Documents\Irrlicht\IPhysics-1.2\include\CPhysicsCar.h|61|error: ISO C++ forbids declaration of 'NewtonBody' with no type|
C:\Users\Stijn\Documents\Irrlicht\IPhysics-1.2\include\CPhysicsCar.h|61|error: expected ';' before '*' token|
C:\Users\Stijn\Documents\Irrlicht\IPhysics-1.2\include\CPhysicsCar.h|62|error: ISO C++ forbids declaration of 'NewtonJoint' with no type|
C:\Users\Stijn\Documents\Irrlicht\IPhysics-1.2\include\CPhysicsCar.h|62|error: expected ';' before '*' token|
C:\Users\Stijn\Documents\Irrlicht\IPhysics-1.2\include\CPhysics.h|33|error: ISO C++ forbids declaration of 'NewtonWorld' with no type|
C:\Users\Stijn\Documents\Irrlicht\IPhysics-1.2\include\CPhysics.h|33|error: expected ';' before '*' token|
C:\Users\Stijn\Documents\Irrlicht\IPhysics-1.2\include\CPhysics.h|47|error: expected ';' before '(' token|
C:\Users\Stijn\Documents\Irrlicht\IPhysics-1.2\include\CPhysics.h|48|error: 'NewtonCollision' has not been declared|
C:\Users\Stijn\Documents\Irrlicht\IPhysics-1.2\include\CPhysics.h|49|error: 'NewtonCollision' has not been declared|
C:\Users\Stijn\Documents\Irrlicht\IPhysics-1.2\include\CPhysics.h|50|error: 'NewtonCollision' has not been declared|
C:\Users\Stijn\Documents\Irrlicht\IPhysics-1.2\include\CPhysics.h|51|error: ISO C++ forbids declaration of 'NewtonWorld' with no type|
C:\Users\Stijn\Documents\Irrlicht\IPhysics-1.2\include\CPhysics.h|51|error: expected ';' before '*' token|
||=== Build finished: 45 errors, 0 warnings ===|
I downloaded icaro56 his version included the Iphysics.lib and let in search in \include and put this at the start of my program:
#include <IPhysics.h>
#pragma comment(lib, "IPhysics.lib")
Thing is I don't have a newton.h file and neither was is in the original or icario his