RapchikProgrammer wrote:The IrrToNewton and NewtonToIrr constants help a lot when working with irrlicht and newton in my opinion as the irrlicht newton is the same as one newton unit multiplied by IrrToNewton! Hence a cube of 1,1,1 in irrlicht is really (1,1,1) * IrrToNewton! Its not necessary but it helps to have a sense of uniform scale between irrlicht objects and newton objects!
You've got the wrong idea about that IrrToNewton constant. It was added to the Mercior demo in order to compensate for numerical precision in a specific quake3 map. Applying it to everything is the wrong thing to do. This scaling constant(s) should be settable via an IPhysics call and should default to 1.0f. For example, if my level is already scaled down to a suitable size, when I pass it to IPhysics it will be scaled down again - not helping precision!
Ill try and contact mercior about this! I dont remember why i chose to include these constants in iphysic, but i think they allowed newton to be more stable! I am not very certain about much of this so i will try and contact him!
You are not forced to have necessarly all 4wd, you can get the pointer of individual wheels and set the torque yourself to have it your way!
A2:
The newton vehicle wrapper is made for 4 wheel cars, so to make a bike or a trike or a 16 wheeler you need to have raycast vehicles! Making raycast vehicles is a bit complex, and i havent tried it yet, but making it wud be useless cause you wont get proper result with one class made for trikes and bikes and 16 wheelers, you need to make individual class! So if you want to have bikes and trikes you need to make em yourself!
3rd question: If it's not supported, I'd just ues the simplified mesh as the vehicle mesh but make it invisible. Now before rendering I'd just move the more detailed mesh to the position of the collision mesh, copy orientation etc, and then render it.
Ico wrote:3rd question: If it's not supported, I'd just ues the simplified mesh as the vehicle mesh but make it invisible. Now before rendering I'd just move the more detailed mesh to the position of the collision mesh, copy orientation etc, and then render it.
That requires editing the wrapper code. I may as well do it properly if I'm going to rewrite stuff.
This is a version of IPhysics upgraded to Irrlicht 1.3.
Project files for building the library file with Visual Studio 2005 are included. Project file only has paths set for Release build - for Debug build simply add required paths.
Source is designed to be extracted into the Irrlicht 1.3 source. Example: "C:\Develop\irrlicht-1.3\IPhysics 1.5 Irr 1.3".
Only one example - Terrain - has a VS2005 project file. Make project files for other examples as required.
Alterations from "IPhysics 1.5 Irr 1.2":
1. Removed duplicate header files from \source folder.
2. matrices altered from ".M[0]" to ".pointer()" format (Irrlicht 1.3).
3. Header/lib paths for Newton/Irrlicht specified in project files, not in VS2005 global paths. [Newton's <stdafx.h> not exactly good practice.]
4. Added "using namespace std" to files that needed it (mainly for streams).
5. Changed stream includes from <fstream.h> format to <fstream> format as required by VS2005. Should be OK for previous compilers but VS2005 is more strict regarding compliance.
6. Changed an instance of all 16 matrix floats being multipled by IrrToNewton. Now "matrix *= IrrToNewton".
7. pure virtual getEntityType() not implemented, leading to unresolved function when linking lib. Commented out getEntityType() from IPhysics headers for now. Implement as needed.
Well i tired compiling the character controller example on vc6 but it didnt work! Try it yourself! In my opinion character controller shud be a mess! I have already done what you have posted! Its the changes in the irr 1.3 camera that are bugging me.
just a little tip for anybody else trying out sio's 1.3 conversion on vista, you MUST recompile the static lib, otherwise all the examples will fail to link.
My irrlicht-based projects have gone underground for now, but if you want, check out my webcomic instead! http://brokenboomerang.net