IrrNewton animator
Code: Select all
void IrrNewtonWorld::UpdateWorld()
{
if( m_World && m_Device->isWindowActive())
{
// first update
if( m_LastUpdate == 0)
{
m_LastUpdate = m_Device->getTimer()->getTime();
}
else if( (m_LastUpdate + m_UpdateRate) > m_Device->getTimer()->getTime())
{
NewtonUpdate( m_World, m_UpdateRate);
m_LastUpdate = m_Device->getTimer()->getTime();
}
else
{
}
}
}
Code: Select all
if( m_World && m_Device->isWindowActive())
Please send me an e-mail instead of a private message.
yeh i got that too
yeh mine gets stuck too. Also i dunno if anybody mentioned this part: once your stuck, it instead of shooting seems to just place the box a certain distance away in whatever direction you were facing rather than "shooting" it.
I will attempt to help debug it too, but likely schick will find it first since he is of course the most familiar with this code
cheers all
(looking forward to pluggin' this nifty little animator into my game engine)
I will attempt to help debug it too, but likely schick will find it first since he is of course the most familiar with this code
cheers all
(looking forward to pluggin' this nifty little animator into my game engine)
My irrlicht-based projects have gone underground for now, but if you want, check out my webcomic instead! http://brokenboomerang.net
Projects news:
Updated to 2.2:
- links against newton 1.30 (be sure you have upgraded)
- bug fixes
- more bug fixes
- some minor changes to the IrrNewtonWorld and the IrrNewtonAnimator interface
ToDo:
- add joints (there is a vehicle joint available)
- add missing rigid bodies
- add all raycast functions
I please you to use the code and test it. I am currently working on another project, too. Therefore my testing time is, give it 3 runs if it works ok . Not that good i know.
You can download the demo (well, just a fps camera and some shooting) and the current source here:
http://www.bluffel.de.vu/
The documentation was also updated here:
http://www.bluffel.de.vu/IrrNewton/Docu/
Best regards,
Schick
Updated to 2.2:
- links against newton 1.30 (be sure you have upgraded)
- bug fixes
- more bug fixes
- some minor changes to the IrrNewtonWorld and the IrrNewtonAnimator interface
ToDo:
- add joints (there is a vehicle joint available)
- add missing rigid bodies
- add all raycast functions
I please you to use the code and test it. I am currently working on another project, too. Therefore my testing time is, give it 3 runs if it works ok . Not that good i know.
You can download the demo (well, just a fps camera and some shooting) and the current source here:
http://www.bluffel.de.vu/
The documentation was also updated here:
http://www.bluffel.de.vu/IrrNewton/Docu/
Best regards,
Schick
Please send me an e-mail instead of a private message.
-
- Posts: 121
- Joined: Tue Feb 10, 2004 6:39 am
- Location: the land of chaotic dreams
- Contact:
I have the latest Newton, and read the readmefirst.txt that came with it, copying what it told me to into the code, but still I get those four errors.Compiling...
main.cpp
d:\NewtonSDK\sdk\Newton.h(16) : error C2146: syntax error : missing ';' before identifier '_NEWTON_USE_LIB'
d:\NewtonSDK\sdk\Newton.h(16) : error C2501: 'declare' : missing storage-class or type specifiers
d:\NewtonSDK\sdk\Newton.h(16) : error C2144: syntax error : 'int' should be preceded by ';'
d:\NewtonSDK\sdk\Newton.h(16) : error C2501: '_NEWTON_USE_LIB' : missing storage-class or type specifiers
IrrNewton - 4 error(s), 0 warning(s)
In the newton txt file for the new version is reads
Any suggestions? I got a lot more errors before reading that .txt file and copying over what it says to.- To link with libraries you will need to declare _NEWTON_USE_LIB before you include newton.h in your project
- if you are linking visual with VS 6. You will need to declare the following in any of you C or C++ modules
#if (_MSC_VER >= 1300)
//VC7 or later, building with pre-VC7 runtime libraries
//defined by VC6 C libs
extern "C" long _ftol (double);
extern "C" long _ftol2( double dblSource )
{
return _ftol( dblSource );
}
#endif
----
When I run the example of your program, I notice that movement speed is very slow. Is that done on purpose?
Shooting the boxes outward is odd since they stop after a certain distance, frozen in midair. I assume it is suppose to do that. I'd rather have each object with a variable called range, which would destroy it after it went a certain distance, so if ever you miss your target, it doesn't keep track of the projectiles movement is it sails off to the end of the massive world most games would have, or hit someone on another continent.
"Those scoundrels! Here we are enjoying a day at the beach, and they send a horde of bullets over at us!"
"Uh... didn't you stand on the beach a few minutes ago and say, hey, check out how cool my new weapon is, then shoot over in their direction first?"
"Curse these weapons with their unlimited range, and the devestation they will surely reek upon our world... then again, I can now slay all monsters from an insane distance."
*yawn* its too early in the morning to be funny. I know its just alpha so that'll probably change.
Artillary shells would be affected by gravity, and arch downward to the ground, while regular bullets/magic fireballs/arrows etc. would fire straight ahead a certain distance before vanishing.
Nice work so far though.
The last sane human being in a world gone mad
http://s8.invisionfree.com/Game_Maker_f ... hp?act=idx
http://s8.invisionfree.com/Game_Maker_f ... hp?act=idx
If you like to link to the static library you need that compiler #define for the msvc6. The new static library, not tested myself, but could be be linked under linux, too.
If you link against the dll library, there is no problem linking with msvc6.
The demo is not supposed to be a game demo. It just shows what can be done easily. You only need a few function calls and the hole physic stuff is working.
Cheers,
Schick
If you link against the dll library, there is no problem linking with msvc6.
The demo is not supposed to be a game demo. It just shows what can be done easily. You only need a few function calls and the hole physic stuff is working.
Cheers,
Schick
Please send me an e-mail instead of a private message.
New release of IrrNewton. If you are using IrrNewton, please upgrade.
The random crashing of Newton was fixed.
Grab the source of IrrNewton here: http://www.bluffel.de.vu/
Cheers,
Friedrich Schick
The random crashing of Newton was fixed.
Grab the source of IrrNewton here: http://www.bluffel.de.vu/
Cheers,
Friedrich Schick
Please send me an e-mail instead of a private message.
Friedrich,
Just started using IrrNewton. Great work, thanks.
I've got a problem with the freeing up of resources. IrrNewtonAnimator::StopIrrNewtonAnimator keeps re-entering via the NewtonDestroyBody call so that eventually there is a stack overload.
Not too sure what the problem is, maybe you could have a look.
Thanks
Joe
Just started using IrrNewton. Great work, thanks.
I've got a problem with the freeing up of resources. IrrNewtonAnimator::StopIrrNewtonAnimator keeps re-entering via the NewtonDestroyBody call so that eventually there is a stack overload.
Not too sure what the problem is, maybe you could have a look.
Thanks
Joe
I reworked the material system to work with int instead of string. Furthermore, i patched some functions to accurate the speed.
Yeah, you could "fix" the bug just by setting the Newton Body to NULL instead of calling StopIrrNewtonAnimator(). That bug remained from the last Newton SDK, which had some bugs itself and i had to do a workaround.
Cheers,
Schick
Yeah, you could "fix" the bug just by setting the Newton Body to NULL instead of calling StopIrrNewtonAnimator(). That bug remained from the last Newton SDK, which had some bugs itself and i had to do a workaround.
Code: Select all
m_NewtonBody = NULL;
Schick
Please send me an e-mail instead of a private message.