Gmnewton 2.0
#81
Posted 21 March 2009 - 06:18 PM
#82
Posted 21 March 2009 - 08:41 PM
Edit: 'Things' as in the simulation.
Edited by Skarik, 21 March 2009 - 08:41 PM.
#83
Posted 04 April 2009 - 01:40 PM
-hanson
#84
Posted 08 April 2009 - 03:03 AM
Edited by Skarik, 08 April 2009 - 03:03 AM.
#85
Posted 08 April 2009 - 03:06 AM
#86
Posted 08 April 2009 - 03:43 AM
Once those functions have been included, I'll quit nagging ;D
#87
Posted 09 April 2009 - 11:54 PM
#88
Posted 10 April 2009 - 01:54 AM
This could be used to create a basic 3D-FPS with accurate physics.How would i put this in a game? , i don't under stand alot of the code , i would like to make something with this but i might need an example that has just the basic collision between the camera object and the map model like an fps.
If you don't know how to use this - chances are that you probably don't need to use this.
Edited by RamboFox, 20 April 2009 - 03:12 AM.
#89
Posted 10 April 2009 - 03:51 AM
Joints will be coming(breakable of course). I just have to think up the most efficient way to handle them. Currently I'm working on collision responses and that's coming along nicely.
@Sin99: There is actually no good way to do camera collisions yet, but I will wrap the raycasting code eventually. As RamboFox said, it is somewhat complex. Is there any specific point you're having trouble with?
@Everybody: There is a beta release out for the next version of NGD that is supposed to be pretty stable. I might switch over to that version. Any thoughts?
Edit: Here is a small update that lets you do a little more: http://host-a.net/ha...Newton_0.04.zip
You can now(in addition to all previous features):
- SetGravity
- GetGravity
- BodySetAngularDamping
- BodySetLinearDamping
God bless,
-hanson
Edited by hanson, 11 April 2009 - 04:07 AM.
#90
Posted 02 May 2009 - 10:16 PM
EDIT:: Haha I think it maybe real simple to do it with this. Just use the collision line function in the direction of gravity to return that z point (I assume there is such function in this dll?)? Of course that depends on whether or not speed becomes an issue. I know there is a similar collision line function in ModModCollisions so I will write a program that checks the speeds between the two DLLs and see which is faster.
Edited by qwertyuiop23, 02 May 2009 - 10:18 PM.
#91
Posted 02 May 2009 - 11:54 PM
#92
Posted 03 May 2009 - 03:14 AM
Skarik - I look forward to seeing your game!
On a sad note, I haven't got much done in the past month on this or any of my personal projects
-hanson
#93
Posted 03 May 2009 - 06:13 AM
#94
Posted 03 May 2009 - 02:06 PM
A character walking over a terrain, not possible with the way that the DLL is set up at the moment i think?
Ah. You are correct. I hope to have a solution for this next release.
#95
Posted 04 May 2009 - 08:21 AM
#96
Posted 05 May 2009 - 03:21 AM
#97
Posted 06 May 2009 - 04:02 AM
#98
Posted 07 May 2009 - 10:30 PM
#99
Posted 10 May 2009 - 06:36 PM
Just a quick update, I got collision callback interface working with the next version(unreleased as of now). Would've been a lot quicker if I knew C++ better, but I'm thankful for the experience I am gaining
[100%] Collision event interface (manual)
[100%] Linking/un-linking bodied and objects
[ 80% ] Character joint
[100%] add/set forces
[100%] add/set torque
[100%] Definable gravity force and direction
[ 0% ] Rigid joints
[ 0% ] Dry rolling friction joint
And the three that are left should be fairly easy to implement once I get back from my trip.
-hanson
edit: Progress updated! 5/10/09 10:26 PM
Edited by hanson, 11 May 2009 - 03:29 AM.
#100
Posted 12 May 2009 - 04:28 AM
A thing that I would find useful would be a keep-upright force or constraint where the syntax is about:
GmnBodyAddUprightForce( world, body, xup, yup, zup, damping ); GmnBodyAddUprightTorque( world, body, xup, yup, zup, damping );The reason for this is that I'm finding more and more the need for such a function when dealing with non-standard gravity...and it's a pain to figure out. Friction is also a bit hard to implement, and it would probably be faster to just have a function defining regular or angular friction.
I don't know if this is relevant, but in the current version of Bullet, my scripts fail when calling GmnCollisionEventGetContactPoint() in any way shape or form. Well, when calling in the same spot as the other three collision scripts. What could be the cause of this? I know that this same thing happens with U3D when calling invalid code.
This is basically my code. I narrowed it down to the function I pointed out above.
var i, i_max, i_i_collision, i_i_collision2;
var x_pos, y_pos, z_pos, i_i_i_inst;
i_max = GmnCollisionEventCount();
for (i = 0; i < i_max; i += 1)
{
i_i_collision = GmnCollisionEventGet(i,0);
i_i_collision2 = GmnCollisionEventGet(i,1);
if (i_i_collision <= 0)||(i_i_collision2 <= 0)
{
continue;
}
if (i > 4)
{
break;
}
if ((i_i_collision == id))
{
var i_i, i_i_max;
i_i_max = GmnCollisionEventGetContactCount(i);
for (i_i = 0; i_i < i_i_max; i_i += 1)
{
if (i_i > 3)
{
break;
}
x_pos = GmnCollisionEventGetContactPoint(i,i_i,0);
y_pos = GmnCollisionEventGetContactPoint(i,i_i,1);
z_pos = GmnCollisionEventGetContactPoint(i,i_i,2);
my_sparks.x = x_pos;
my_sparks.y = y_pos;
my_sparks.z = z_pos;
with (my_sparks)
{
SetParticleCount(3,5,150);
ParticleSystemStep();
SetParticleCount(0,0,150);
}
}
}
}But hey, cool! And keep on working!
Edit: One more thing. Sometimes when colliding into things at high speeds (it's an attempt at a trippy racing game), my Newton body goes flying off. Same thing when colliding with certain complex trimeshes. It may have to do with my using of the GmnBodyGetOmega() to do angular friction, but I doubt it. Is there anything that comes up off the top of your head?
Edited by Skarik, 12 May 2009 - 04:29 AM.
0 user(s) are reading this topic
0 members, 0 guests, 0 anonymous users









