IPhysics - Newton/Irrlicht framework

Announce new projects or updates of Irrlicht Engine related tools, games, and applications.
Also check the Wiki
MM2_23
Posts: 12
Joined: Sun Jan 07, 2007 3:24 am

Post by MM2_23 »

I've wrapped my mesh in a convex hull and had it fall from the sky onto my terrain created by a treecollision (from IPhysics). My mesh falls nicely (actually slowly like moon physics for some reason, my fps is around 50) and bounces off the terrain and eventually settles but from then on when I move my mesh around it doesn't seam to experience gravity any more and doesn't fall off my cliffs or anything. Could this be caused by the fact that I'm moving my character not by forces but by irrlichts setPostion function directly to the node?? rapchik? Anybody?
BlindSide
Admin
Posts: 2821
Joined: Thu Dec 08, 2005 9:09 am
Location: NZ!

Post by BlindSide »

Yes MM2_23 you must use Newton to move it obviously. BUT even if you did use newton you may experience similar issues if physics was set to automatically disable when an object came to rest, therefore disabling any physics attributes. (Although that will probably mean the node will not move at all using physics). If that is also an issue you may have to check with RP on how this is handled in IPhysics, though I think there is a simple newton function to disable/enable this feature. Have a look through the API on how to move a node using physics and to disable AutoRest feature.
shagdawg
Posts: 9
Joined: Mon Jan 08, 2007 11:36 pm

Post by shagdawg »

So from looking through all the pages of post, looking at the examples and the code a little bit right now I have some questions before I start some designing some classes though.

So you can think of my game as another MMORPG (Just take the massive part out though)

Anyhow I want to use a sphere (ellipsoid) for my character which looks fairly easy. However I do not want IPhysics/Newton to touch the rotation. Only the location. Is there a way to do this? If so could I get a good idea of what to do and even possible some sudo code (or a full example if someone wants to take the time).

The second question that I have is I want characters to be able to run through each other. So if I have 2 characters (each represented by a Sphere/Ellipsoid) is there a way for IPhysics/Newton to be able to ignore them running through each other?

The third question that I have from the looks of it, I have to update the newton world at the same time. Would it be possible if was to update just the main character, then run some of my code, and then update the rest of the world. Main reason that I ask this question is because of a third person camera which can collide into objects as well.

Well this is all I have for now.

Thanks
BlindSide
Admin
Posts: 2821
Joined: Thu Dec 08, 2005 9:09 am
Location: NZ!

Post by BlindSide »

shagdawg, in most physics ive seen which Irrlicht/newton the rotation is not touched. It is easy if you just do your own newton integration and leave out the rotation part.
MM2_23
Posts: 12
Joined: Sun Jan 07, 2007 3:24 am

Post by MM2_23 »

@blindside

I figured the same thing out once I had a good nights sleep. My addforceandtorque callback stopped but I used setbodyautofreeze to ignore so it keeps calling my callback. The only thing is that my settransform callback isn't called anymore either. I'm trying to figure out how to get it up to update except to have the node move from irrlicht instead of the newtonbody matrix created with forces.

I was thinking I would implement code where I would update the node position using irrlicht and then set the body matrix of the newtonbody. Is there anyone else who has tried this? Is there a way to make it force the settransformcallback to continue?
RapchikProgrammer
Posts: 279
Joined: Fri Dec 24, 2004 6:37 pm

Post by RapchikProgrammer »

Update, included all joints available in newton! Most probably nextup wud be for the characters to climb stairs and ragdolls!
Coolkat88
Posts: 30
Joined: Tue Oct 03, 2006 3:14 pm

Post by Coolkat88 »

great job on this porject RP! it's really moving along now...

and also, did i miss something but when did nick_japan fall off the face of the earth on this one? hmm.. but still keep up the great work RP :)
RapchikProgrammer
Posts: 279
Joined: Fri Dec 24, 2004 6:37 pm

Post by RapchikProgrammer »

Thanks coolkat! And BTW i havent uploaded the joints update currently, ill probably add some more features and then upload it!
Nick_Japan
Posts: 98
Joined: Mon Dec 13, 2004 11:47 am
Location: Japan

Post by Nick_Japan »

Hiya all,

First of all, many many thanks to RapchikProgrammer for his great work on upgrading IPhysics. Sorry I haven't been around much - new job has taken up all of my programming brainspace...

Anyway, hopefully this weekend I'll try and do an official release incorporating all RapchikProgrammer's changes, so we all have a new release and are all on the same page, with updated docs and everything. Having said that, I'm all for collaboration on this; I'm not particularly interested in physics programming, it's just that I want to make a game with physics in it sometime, and for that I would need a solid, easy physics interface and there wasn't one. I'm still here. Face of the earth still very much nearby :wink:
Image Image
DavidR
Posts: 34
Joined: Sat Jul 15, 2006 5:12 pm

Post by DavidR »

So um, has anything been done to stop the massive blatant memory leak in IPhysics, or am I the only one who seems to care about this? (not meaning to sound rude).

This is the main factor preventing me from using IPhysics at the moment, since being a perfectionist, I cannot tolerate any leaks at all (and there should be no leaks anyway to be honest, no matter how little of a perfectionist you are)
buhatkj
Posts: 444
Joined: Fri Dec 12, 2003 4:53 am
Contact:

yay!

Post by buhatkj »

well mem leak or not, I'm very excited about a new official iPhysics release. sooner the better :-)

as for the memory leak, perhaps more info would help people to address it? is there any info you can provide to help people isolate it? that might speed up a fix.
My irrlicht-based projects have gone underground for now, but if you want, check out my webcomic instead! http://brokenboomerang.net
RapchikProgrammer
Posts: 279
Joined: Fri Dec 24, 2004 6:37 pm

Post by RapchikProgrammer »

Well keep your hopes high buhatkj, cause i am planning an official release of iphysics 2.0 rpedit in some time! I have been really really busy what with counter-strike tournies and ma brother going bak to singapore! So i had literally no time and my mind is still not in much of a thinking position as ma bro left just last night! Neways, the official release will have these additions:

-ragdolls, ill also try and recreate lukes model + ragdoll physics
-buoyancy
-proper and complete character controller
-polished and complete look

After this official release i am thinking of starting on a very ambitious project, an irrlicht + newton visual editor! No idea, whether ill get time to even start on it tho!
Grey Lantern
Posts: 34
Joined: Sat Jul 30, 2005 9:45 am
Contact:

Post by Grey Lantern »

I've been out the loop, apart from that code I added a while back (which isn't needed now anyway) ;)

Can someone with more experience with Newton/i-physics tell me if it's possible (easily) to create a mouse/user controlled mesh that collides with objects around it based on the speed of the mouse movement.

In otherwords, imagine the user controls a ball(or box/cylinder/whatever) that can move around a field and moves in perfect sync with the mouse movement (direct control, no acceleration). As it hits scattered meshes around the field (other iphysics objects) they bounce, topple, get knocked away as would be expected.

It's probably an extremely simple thing but as I said I've not really dabbled enough with newton to know how to go about it (therefore a quick description in psuedo code if it's possibly with iphysics would be cool).

thanks :)
RapchikProgrammer
Posts: 279
Joined: Fri Dec 24, 2004 6:37 pm

Post by RapchikProgrammer »

@Greylantern: I think you just need to create a primitive as shown in the examples code, and then set the primitives position to the mouse position! primitive->setPosition(mousePosition);
Grey Lantern
Posts: 34
Joined: Sat Jul 30, 2005 9:45 am
Contact:

Post by Grey Lantern »

thanks I'll give it a try.
Post Reply