Tumle v1.4 irrlicht/newton
Tumle v1.4 irrlicht/newton
Tumle 1.4
You would think that such a big leap in version number meant that a big deal has happened. Thats not the case, sorry. This is just to indicate that Tumle now works with irrlicht 1.4. The only thing changed is the way the event receiver is passed on to the Tumle classes. In stead of a pointer, it is now a const ref.
I've also made Tumle a little more Linux friendly, by putting in a 'configure' script that makes some makefiles.
Here's the link: tumle-1.4.zip
mirror
mirror
~ 160 kb.
Thanks to FuzzYspo0N for pointing out the need to update.
Tumle v0.1
Tumle is a irrlicht/newton framework i've been working on as I thought it would be usefull for a game.
Tumle (aka IN) consists of the same files as IN, the only thing changed is the name and some small stuff, I've also added a version number for convenience.
The features:
- create physics objects from scene nodes.
- create and apply materials to the objects, to control the objects behavior.
- collision callbakcs, to control what happens when objects collide.
- user controlled physics objects.
- user controlled physics FPS camera.
Download includes
- Source files.
- Six example files.
How to use Tumle
- Download the newton SDK, include newton.h and link to newton.lib.
- Add the Tumle source files to you project and include the Tumle includes.
- Do whatever you do when you use Irrlicht.
The only thing left now is to download: tumle.zip ~ 160 KB (this is the old one - look above)
Changes since IN:
http://www.jonlt.frac.dk/tumle/changes.txt
P.S. To you who use IN (if any) just rename everything that was called IN to Tumle, and you should be fine.
You would think that such a big leap in version number meant that a big deal has happened. Thats not the case, sorry. This is just to indicate that Tumle now works with irrlicht 1.4. The only thing changed is the way the event receiver is passed on to the Tumle classes. In stead of a pointer, it is now a const ref.
I've also made Tumle a little more Linux friendly, by putting in a 'configure' script that makes some makefiles.
Here's the link: tumle-1.4.zip
mirror
mirror
~ 160 kb.
Thanks to FuzzYspo0N for pointing out the need to update.
Tumle v0.1
Tumle is a irrlicht/newton framework i've been working on as I thought it would be usefull for a game.
Tumle (aka IN) consists of the same files as IN, the only thing changed is the name and some small stuff, I've also added a version number for convenience.
The features:
- create physics objects from scene nodes.
- create and apply materials to the objects, to control the objects behavior.
- collision callbakcs, to control what happens when objects collide.
- user controlled physics objects.
- user controlled physics FPS camera.
Download includes
- Source files.
- Six example files.
How to use Tumle
- Download the newton SDK, include newton.h and link to newton.lib.
- Add the Tumle source files to you project and include the Tumle includes.
- Do whatever you do when you use Irrlicht.
The only thing left now is to download: tumle.zip ~ 160 KB (this is the old one - look above)
Changes since IN:
http://www.jonlt.frac.dk/tumle/changes.txt
P.S. To you who use IN (if any) just rename everything that was called IN to Tumle, and you should be fine.
Last edited by JonLT on Tue Oct 20, 2009 3:16 pm, edited 23 times in total.
I've made some better documentation http://www.jonlt.frac.dk/IN it really made me feel important
And I've added Q and A tags in the initial post for you midnight
EDIT: (documentation is included in the download now)
And I've added Q and A tags in the initial post for you midnight
EDIT: (documentation is included in the download now)
Last edited by JonLT on Wed Oct 21, 2009 1:29 am, edited 1 time in total.
not exactly. i done this like you said. here it is
body is still moving faster and faster. i tried not to add current velocity, then body speed is cinstant but gravity does not work for this body.
Code: Select all
void Player::updateMovement()
{
vector3df move(0,0,0);
if(keysDown[KEY_KEY_W])
move.Z += MAX_SPD;
if(keysDown[KEY_KEY_S])
move.Z -= MAX_SPD;
if(keysDown[KEY_KEY_A])
move.X -= MAX_SPD;
if(keysDown[KEY_KEY_D])
move.X += MAX_SPD;
node->getAbsoluteTransformation().rotateVect(move);
float moveF[3];
tb::vecToFloat(&move, &moveF[0]);
float currVeloc[3];
NewtonBodyGetVelocity(body, &currVeloc[0]);
float newVeloc[3];
newVeloc[0] = moveF[0] + currVeloc[0];
newVeloc[1] = moveF[1] + currVeloc[1];
newVeloc[2] = moveF[2] + currVeloc[2];
NewtonBodySetVelocity(body, &newVeloc[0]);
}
you are adding the velocity, but you just need to set it:
and after the key check try this:
[EDIT: sorrry didn't see that last line in your post , im currently trying to get the same thing to work]
Code: Select all
if(keysDown[KEY_KEY_W])
move.Z = MAX_SPD; //not +=
Code: Select all
float newpos[3] = {move.X,0, move.Z}; //only mover vertically
NewtonBodySetVelocity(body, (float*)newpos);
if(!(event.KeyInput.PressedDown)) //stop the camera if the keys are released
{
move.X -= somefloat;
move.Z -= somefloat;
}
check this out http://www.newtondynamics.com/forum/viewtopic.php?t=753 maybe you will have more luck in understanding it
this is what needs to be done:
this gets the vertical velocity and passes it on the the new velocity
Code: Select all
node->getRelativeTransformation().rotateVect(move);
float currVeloc[3];
NewtonBodyGetVelocity(body, &currVeloc[0]);
float newpos[3] = {move.X,currVeloc[1], move.Z};
NewtonBodySetVelocity(body, (float*)newpos);
Julio Jerez wrote this:
Wikipedia on inverse dynamics: http://en.wikipedia.org/wiki/Inverse_dynamics
If you set the mass of the camera to much less than that of the bodies, the only wrong thing happening is, that if the camera is moving while being hit with someting, it will not respond all to good, but the object hitting it behaves as it should.
on the newton forum:http://www.newtondynamics.com/forum/vie ... php?t=3370Unfortunately there is not way to move bodies kinematically in 1.5, 1.6 will have that ability so these problems will be a lot easier to deal with, since it will be legal to set the body velocities and the solver will understand it correctly. This will allow for the implementation of player without having to use inverse dynamics.
Until then thei sis the only thing Newton can offer.
Wikipedia on inverse dynamics: http://en.wikipedia.org/wiki/Inverse_dynamics
So unless we want to give the camera legs, i think we have to settle with infinit-mass-camera.Inverse dynamics uses link-segment models to represent the mechanical behavior of connected pendulums, or more concretely, the limbs of humans or animals, where given the kinematic representation of movement, inverse dynamics derives the kinetics responsible for that movement. In practice, from observations of the motion (of limbs), inverse dynamics is used to compute the associated moments (joint torques) that lead to that movement, under a special set of assumptions.
If you set the mass of the camera to much less than that of the bodies, the only wrong thing happening is, that if the camera is moving while being hit with someting, it will not respond all to good, but the object hitting it behaves as it should.