IPhysics - Newton/Irrlicht framework
-
- Posts: 279
- Joined: Fri Dec 24, 2004 6:37 pm
-
- Posts: 1029
- Joined: Thu Apr 06, 2006 12:45 am
- Location: Tennesee, USA
- Contact:
-
- Posts: 269
- Joined: Tue Oct 31, 2006 3:24 pm
- Contact:
hi. if the problem is that the character move correctly but when he arrive below a stair doesn't claimb it, or he goes up a bit to climb but after he goes down, I think that it would depends by the too high gravity force (I have had the same problem). this is only a suggestion. hope that this helpNow character controller is almost complete it just doesnt go over stairs!
-
- Posts: 279
- Joined: Fri Dec 24, 2004 6:37 pm
Hey, i was thinking of setting up some of the minor bugs and including climbing stairs facility before uploading it, but heres the code!
Few things about the program, my net SUCKS so i have removed the documentation cause i didnt update it and removed the Microsoft.VC80.CRT folder cause i thought it was useless, atleast for me! Secondly, u have to put the irrlicht and newton dlls in the example folder to run the examples cause i have removed them and u also need to put map-20kdm2.pk3 from irrlicht-1.2/media to the examples folder!
The link:
http://file.uploadr.com/baea
edit: Well even though i have updated the file, i saw today it has many features missing and may have some bugs, so don't think this is the final version, i am making some upgrades on this and then will upload a more complete version hopefully in some time, but do download this and tell me what you think needs to be done to this and its only 500 kb so it wont be a prob for dnlding! And one more thing, i accidently cut cameracol code from the level example, so just copy the camera part from the terrain example and paste just before the main loop in the examples folder!
Few things about the program, my net SUCKS so i have removed the documentation cause i didnt update it and removed the Microsoft.VC80.CRT folder cause i thought it was useless, atleast for me! Secondly, u have to put the irrlicht and newton dlls in the example folder to run the examples cause i have removed them and u also need to put map-20kdm2.pk3 from irrlicht-1.2/media to the examples folder!
The link:
http://file.uploadr.com/baea
edit: Well even though i have updated the file, i saw today it has many features missing and may have some bugs, so don't think this is the final version, i am making some upgrades on this and then will upload a more complete version hopefully in some time, but do download this and tell me what you think needs to be done to this and its only 500 kb so it wont be a prob for dnlding! And one more thing, i accidently cut cameracol code from the level example, so just copy the camera part from the terrain example and paste just before the main loop in the examples folder!
newton.h
it keeps asking for newton.h witch doesn't exist
i downloaded it from the newton website but it still gives mo five errors
i downloaded it from the newton website but it still gives mo five errors
Code: Select all
Linking...
IPhysics.lib(CPhysics.obj) : MSIL .netmodule or module compiled with /GL found; restarting link with /LTCG; add /LTCG to the link command line to improve linker performance
MSVCRT.lib(MSVCR80.dll) : error LNK2005: _free already defined in LIBCMT.lib(free.obj)
MSVCRT.lib(MSVCR80.dll) : error LNK2005: _malloc already defined in LIBCMT.lib(malloc.obj)
MSVCRT.lib(ti_inst.obj) : error LNK2005: "private: __thiscall type_info::type_info(class type_info const &)" (??0type_info@@AAE@ABV0@@Z) already defined in LIBCMT.lib(typinfo.obj)
MSVCRT.lib(ti_inst.obj) : error LNK2005: "private: class type_info & __thiscall type_info::operator=(class type_info const &)" (??4type_info@@AAEAAV0@ABV0@@Z) already defined in LIBCMT.lib(typinfo.obj)
LINK : warning LNK4098: defaultlib 'MSVCRT' conflicts with use of other libs; use /NODEFAULTLIB:library
C:\Documents and Settings\calle\Skrivbord\c++\irrlicht-1.2\IPhysics-1.2\examples\newton example\Debug\newton example.exe : fatal error LNK1169: one or more multiply defined symbols found
-
- Posts: 279
- Joined: Fri Dec 24, 2004 6:37 pm
oops, looks like Microsoft.VC80.CRT folder was for some purpose! Here it is with the folder!
http://file.uploadr.com/bb6b
http://file.uploadr.com/bb6b
IPhysics for MacOS X
Hi, thanks for some great interface classes. I had some problems with the built-in Irrlicht collision detection and response functions. I don't really need an advanced physics engine like Newton, but I do need working collision detection and response.
Anyway, I have managed to put together an Xcode (MacOS X) project for IPhysics 1.2 and compiled all examples. They seem to work just fine. I know, I know it doesn't take a genius to do that or anything. Still just making it compile and getting all settings right takes some hours. I'm going to write a tutorial and if anyone is interested I could post my Xcode project to save everyone else the time. Also, feel free to include any of my stuff in the IPhysics download. I know I would have appreciated if the examples built out of the box on my Mac.
One tiny (stupid) question. I had to comment out all the "__cdecl" to make it compile. What are those for and how can we fix so the source compiles cross-platform?
Anyway, I have managed to put together an Xcode (MacOS X) project for IPhysics 1.2 and compiled all examples. They seem to work just fine. I know, I know it doesn't take a genius to do that or anything. Still just making it compile and getting all settings right takes some hours. I'm going to write a tutorial and if anyone is interested I could post my Xcode project to save everyone else the time. Also, feel free to include any of my stuff in the IPhysics download. I know I would have appreciated if the examples built out of the box on my Mac.
One tiny (stupid) question. I had to comment out all the "__cdecl" to make it compile. What are those for and how can we fix so the source compiles cross-platform?
CharacterController
I compiled it using Xcode on my PPC Mac. I corrected some glitches in the examples in addition to adding the camera as suggested. The camera jerks around a lot in the level example. I can't move at all in the terrain example.RapchikProgrammer wrote:Well even though i have updated the file, i saw today it has many features missing and may have some bugs, so don't think this is the final version, i am making some upgrades on this and then will upload a more complete version hopefully in some time, but do download this and tell me what you think needs to be done to this and its only 500 kb so it wont be a prob for dnlding!
Character controller is something that I really need. The NewtonSDK has a great CharacterController class in the tutorial with the same name. Porting it to IPhysics would be a good start. If I manage to understand IPhysics a little bit better I might be able to do it. However, at the moment I don't yet have a grip on everything.
So, why not share the source? I'm sure we could all use a cylinder or two!Grey Lantern wrote:ok iv'e looked at the source (rather than the docs) and found that it was simple enough to add in the missing "cylinder" functionality and include the files in my test project so now I have A SPhysicsCylinder with radius and height.
You can make some code cross-platform using macros.
you don't need __cdecl in the function definition but you can put it there, so if it's there you would have to replace it with IPHYAPI or whatever it is you decide to name it. If you check the Irrlicht code, Niko does this very thing will DLL imports/exports.
more or less that is how that one works.
Code: Select all
#ifdef WIN32
#define IPHYAPI __cdecl
#elsif
#define IPHYAPI
#endif
...
class CName {
void IPHYAPI someFunction();
}
...
void CName::someFunction()
{ }
Code: Select all
#ifdef IRR_WIN // i forget the name that they use at the moment
#ifdef DLL_IMPORT
#define IRRAPI __declspec(dllimport)
#elsif defined(DLL_EXPORT)
#define IRRAPI __declspec(dllexport)
#endif
#endif
You must download Newton from http://www.newtondynamics.com/ and link to it!