Raydium 3D Game Engine
https://memak.raydium.org/

Ideas for "deformable" car
https://memak.raydium.org/viewtopic.php?f=8&t=299
Page 1 of 1

Author:  vicentecarro [ Tue Dec 27, 2005 2:15 am ]
Post subject:  Ideas for "deformable" car

I'm trying to make a car that can be dismantled with the collisions, but i like the car will be form of the whole pieces from the begining, so a door of the car could have been destroyed after a collission, but the car will continue racing with no problem.
Ideas? fixings? joints with 0 values?

Author:  Xfennec [ Tue Dec 27, 2005 8:28 am ]
Post subject: 

IMHO, the main question is: is the car must behave exactly the same way after a door loose (ie: without changing the shape and the weight of the car) ?

If yes, the solution is probably to build the car with a single body (from physics point of vue) and to "attach" other elements while rendering (with raydium_ode_element_RelPointPos() for example).
Then, it's easy to extract (visually) an element from the car, creating a new physic body for this element. You must "monitor" collisions to detect when an element must leave the car. It also possible to build breakable joints (such a hinge joint) instead of just throwing the element away from the car, so the door can flap a bit before falling of.

PS: actually, there's no joint feedback for fixed joints in ODE, so there's no breakable fixed joints with Raydium. We may implement a small workaround (using collision force ?) to allow this, so the car can be "automatically" destructible . This solution is obviously slower than the first one, but more "realistic". And you can also use breakable hinge joints with this solution, too. The other good point here is that this solution is automatically "network friendly".

Author:  vicentecarro [ Tue Dec 27, 2005 11:47 am ]
Post subject: 

Really, i'd like the physic would change if the door(or another element) is extracted from the car. So that method doesn't fit very well in to my idea.
And what is the problem with the "network friendlynes"?
Example of i want it do:
1-you are walking correctly with the full car.
2- you hit and a door now is opened but still turns over his axis
3- you hit again but this time the door and an whell are extracted for the car, but the gameplay continue...

Author:  Xfennec [ Tue Dec 27, 2005 12:52 pm ]
Post subject: 

The second method (fixed joints -> hit -> hinge joint -> hit -> element falls from car) does all this.
The only problem is that we must add "fixed joints breakable support" to RayODE.

Author:  vicentecarro [ Tue Dec 27, 2005 4:53 pm ]
Post subject: 

i have no idea about ODE internals. It's hard to implement?

Author:  Xfennec [ Tue Dec 27, 2005 5:44 pm ]
Post subject: 

Probably not. I think I can do it in one hour or two, including tests. The idea is to check every contact point generated on "fixed joint attached elements" and delete this joint if the value is beyond a threshold.

With current RayODENet, we can expect strange network behaviors with fixed joints, I think (beacause of prediction). There's probably a bit of work here too.

I'll look at this soon.

PS: About "the other subject", I haven't forgot you vicente, but I've a lot of work this days, so it's hard to take the needed time :)

Author:  vicentecarro [ Tue Dec 27, 2005 6:01 pm ]
Post subject: 

about "the other subject", there is no problem, take your time...:)

Author:  vicentecarro [ Thu Mar 09, 2006 7:29 pm ]
Post subject: 

i'm here again.
Xfennec, finally the support for breakable joints has been added?
And did you speak with someone about the "other subject"?

Author:  Xfennec [ Thu Mar 09, 2006 9:17 pm ]
Post subject: 

heu... well... no and no :oops: Sorry :)
I've just added "breakable fixed joints" on my TODO on the wiki (so I dont forget it one more time :) ), and I'll try to contact someone soon who might help me to know more about our problem.

Sorry, again !

Author:  vicentecarro [ Thu Mar 09, 2006 10:07 pm ]
Post subject: 

jejeje, no problem ;)

Page 1 of 1 All times are UTC
Powered by phpBB® Forum Software © phpBB Group
http://www.phpbb.com/