IPhysics - Newton/Irrlicht framework
@savagedp: Looks like a Visual Studio problem - have you upgraded from an old version? If there's nothing obvious I'd go for a reinstall.
Hi... Ermm I'm using a version 2003 Visual Studio.. shouldn't be a problem... unless its a corrupted file or something.. i really dont watn to reinstall. its a pain...
actually I tried newton after that... and i got lost in newton... no idea how to get it to work... i suck at this ....
anywy, maybe i'll just reinstall to see how things go...
THANKS!
Hi... Ermm I'm using a version 2003 Visual Studio.. shouldn't be a problem... unless its a corrupted file or something.. i really dont watn to reinstall. its a pain...
actually I tried newton after that... and i got lost in newton... no idea how to get it to work... i suck at this ....
anywy, maybe i'll just reinstall to see how things go...
THANKS!
-
- Posts: 98
- Joined: Mon Dec 13, 2004 11:47 am
- Location: Japan
A couple of problems...
I have run into two problems(:oops: ) and one question.
1. I am using the svn version of Irrlicht. When I compile the program it says I cannot store pointer (to class) IEventReceiver to variable receiver. I think there is a change in the api for the svn. What do I need to do to fix this?
2. I have included the libirrlicht.a, IPhysics.lib, and Newton.lib libraries into my project settings. I also have included IPhysics.h and made sure that Newton.h is in the same folder as IPhysics.h. However, when I compile the program in Dev-C++ I get the following linker problem:
And finally, how do I make the car and wheels out of meshes rather than just letting IPhysics display them as spheres and rectangles? Currently there is not an example for this. If someone could post some example code for using this fuction that would be great!
Otherwise, I think IPhysics is great. Keep up the good work, Nick_Japan! I like the Irrlicht style coding a lot!:lol:
3ddev
1. I am using the svn version of Irrlicht. When I compile the program it says I cannot store pointer (to class) IEventReceiver to variable receiver. I think there is a change in the api for the svn. What do I need to do to fix this?
2. I have included the libirrlicht.a, IPhysics.lib, and Newton.lib libraries into my project settings. I also have included IPhysics.h and made sure that Newton.h is in the same folder as IPhysics.h. However, when I compile the program in Dev-C++ I get the following linker problem:
How do I fix this?:?:C:\cplus\Irrlicht\Copy of helios_racer\main.o(.text+0x5b5) In function `main':
[Linker error] undefined reference to `CPhysics::CPhysics()'
[Linker error] undefined reference to `CPhysics::init(irr::ITimer*)'
[Linker error] undefined reference to `CPhysics::addCar(SPhysicsCar*)'
[Linker error] undefined reference to `CPhysics::addEntity(SPhysicsStaticMesh*)'
[Linker error] undefined reference to `CPhysics::addEntity(SPhysicsStaticMesh*)'
C:\cplus\Irrlicht\Copy of helios_racer\main.o(.text+0x155b) In function `main':
[Linker error] undefined reference to `CPhysics::update()'
[Linker error] undefined reference to `CPhysics::~CPhysics()'
[Linker error] undefined reference to `CPhysics::~CPhysics()'
51:7 C:\cplus\Irrlicht\Copy of helios_racer\main.o(.text+0x155b) ld returned 1 exit status
C:\cplus\Irrlicht\Copy of helios_racer\Makefile.win [Build Error] [Helios_Racer.exe] Error 1
And finally, how do I make the car and wheels out of meshes rather than just letting IPhysics display them as spheres and rectangles? Currently there is not an example for this. If someone could post some example code for using this fuction that would be great!
Otherwise, I think IPhysics is great. Keep up the good work, Nick_Japan! I like the Irrlicht style coding a lot!:lol:
3ddev
-
- Posts: 98
- Joined: Mon Dec 13, 2004 11:47 am
- Location: Japan
@3ddev: I'm not sure about the Irrlicht SVN problems as I don't use it myself. Regarding the IPhysics linking problems, when you say you've included IPhysics.h, have you set the the include directory in Dev C++ to the IPhysics include directory? It looks like it's including IPhysics.h but can't find the rest of the includes. You shouldn't need IPhysics.lib and IPhysics.a - they're both the same thing, just compiled to different formats. Also, have you got the line
in your project's header? (See global.h in the examples)
About using your own meshes for the car, that's easy. Just load the meshes you want, and add them to your SPhysicsCar struct (carBodyNode for the car body, tireNode_FL for the front left tire, etc).
Code: Select all
#pragma comment(lib, "IPhysics.lib")
About using your own meshes for the car, that's easy. Just load the meshes you want, and add them to your SPhysicsCar struct (carBodyNode for the car body, tireNode_FL for the front left tire, etc).
-
- Posts: 89
- Joined: Thu Aug 17, 2006 8:11 pm
- Location: Salt Lake City, UT, USA
- Contact:
Nice Work!!! I'm just playing around with this and I tried to give the box a little bit of a lift but I'm not vey sucessful. How would you do this say for a monster truck for example where the body sits higher then the wheels.
I've tried something like
carData.carBodyOffset = vector3df(0, 10.0f, 0);
and I think for the physics half that works but the body is still drawn in too low.
Thanks for answering a stupid question in advance.
I've tried something like
carData.carBodyOffset = vector3df(0, 10.0f, 0);
and I think for the physics half that works but the body is still drawn in too low.
Thanks for answering a stupid question in advance.
Definition of an Upgrade: Take old bugs out, put new ones in.
-
- Posts: 98
- Joined: Mon Dec 13, 2004 11:47 am
- Location: Japan
@raven_coda: Ah, that's not quite what carBodyOffset is for. Basically, you need your mesh to be built in your modeller exactly as you want it to come out in the engine. So for your monster truck, if you want it to be higher up, you need to do that in your modeller and then export it again at the right height. The reason for this is that you can then build your vehicle with the wheels in place, and then just pass in the values for axle length and width and so on based on where your wheels are in the modeller. Because currently the car's body is just modelled with a box, if your entire car mesh is above the origin, you can still use the offset to create a box that properly surrounds your car body mesh. Don't worry about all this though: soon a car will have the option to use a convex hull (which is the proper way to do it), and this will in turn use the actual positions of your vertices and all this stuff will go away.
Irrlicht 1.1 svn needs fixes before to work with IPhysics!
IPhysics needs fixes to work with Irrlicht 1.1 svn! In 1.1 sdk you declare your receivers like this:
In Irrlicht 1.1 SVN you declare your receiver like this:
My app with the svn compiled but would not receive any imput. I then compiled in Irrlicht SDK and it worked. Oviously the problem is in the IPhysics classes. I am going to try and fix this, but maybe someone else could too? I think that there should be something like a #define IRR_SVN for declaring the use of the svn version. This way there is only one set of classes and compatibility for "older" versions of Irrlicht. In the future, all Irrlicht sdks will use the svn version of the receiver class, so I think this is important to impliment. I'll send a new version to Nick_Japan if I can get this right!
Code: Select all
bool OnEvent(SEvent event)
{
/*Put all your code here
for receiving events*/
}
Code: Select all
virtual bool OnEvent(const SEvent event)
{
/*Put all your code here
for receiving events*/
}
great work Nick!
But i have the same problem as klikmaster.
My app breakes as it comes to the 2.
When it breaks my debugger says "game.exe has triggered a breakpoint" and shows me the following function in the irrarray.h:
So i searched for the problem in the addEntity function but can't find it.
I hope you can help me and that are enough informations.
EDIT: The modell i'm using works fine
But i have the same problem as klikmaster.
My app breakes as it comes to the 2.
Code: Select all
IPhysicsEntity* BuildingEntity = m_pPhysics->addEntity(&building);
Code: Select all
//! Direct access operator
T& operator [](u32 index)
{
_IRR_DEBUG_BREAK_IF(index>=used) // access violation
return data[index];
}
I hope you can help me and that are enough informations.
EDIT: The modell i'm using works fine
-
- Posts: 98
- Joined: Mon Dec 13, 2004 11:47 am
- Location: Japan
@jaytea, klikmaster: I really need to have a look at the meshes you're trying to load - if you could post a link to the mesh or email it to me that would be great. I have a couple of theories, but without being able to replicate the problem myself it's very difficult for me to fix it.
@3ddev: I intend to keep IPhysics current with the latest stable release of Irrlicht, but I really can't do bleeding-edge SVN versions. Of course if you can solve this then I'll be very happy to include it.
@3ddev: I intend to keep IPhysics current with the latest stable release of Irrlicht, but I really can't do bleeding-edge SVN versions. Of course if you can solve this then I'll be very happy to include it.
-
- Posts: 98
- Joined: Mon Dec 13, 2004 11:47 am
- Location: Japan
-
- Posts: 8
- Joined: Tue Oct 17, 2006 5:18 am
Please, no *!*
Please, no *!* swearing on the forums. It isn't good etiquette!
-
- Posts: 8
- Joined: Tue Oct 17, 2006 5:18 am
please remove this...
Last edited by The Pie God on Sat Oct 28, 2006 8:24 am, edited 1 time in total.