Nothing realistic mind you, I'd actually prefer for it to be "arcadish".
I'm currently looking at using 4 ellipsoids w collision for wheel force modeling and 4 springs attached to a plane.
But I can't get around applying the forces on the springs properly.
Any ideas or articles I could read?
How can I simulate off-road physics W/O a physics engine
Don't listen to these boring guys.
Just code it like "Asteroids", have a rotation independent of velocity (With a bit of friction unlike Asteroids), and you'll be sliding around on the grass in no time!
Just code it like "Asteroids", have a rotation independent of velocity (With a bit of friction unlike Asteroids), and you'll be sliding around on the grass in no time!
ShadowMapping for Irrlicht!: Get it here
Need help? Come on the IRC!: #irrlicht on irc://irc.freenode.net
Need help? Come on the IRC!: #irrlicht on irc://irc.freenode.net
@ACE247, slavik262:
Because a physics engine requires an extra layer of integration, and, for this particular game I don't want to recode the collision for EVERYTHING ELSE apart from the vehicle?
@BlindSide:
That part, I already coded. The rotation is dependent on the steer angle, and it adjusts itself over time and works great (for what I'm making) on a flat plane.
Actually I wanted to simulate springs on my car (make it "bounce" a little), and didn't know how exactly I should approach that.
I was thinking adding springs to a plane, and making use of a fake Weight equation to :
1) "push" down on the springs (the "mass" of the car)
2) the "wheels" would also "push" up on the springs
Because a physics engine requires an extra layer of integration, and, for this particular game I don't want to recode the collision for EVERYTHING ELSE apart from the vehicle?
@BlindSide:
That part, I already coded. The rotation is dependent on the steer angle, and it adjusts itself over time and works great (for what I'm making) on a flat plane.
Actually I wanted to simulate springs on my car (make it "bounce" a little), and didn't know how exactly I should approach that.
I was thinking adding springs to a plane, and making use of a fake Weight equation to :
1) "push" down on the springs (the "mass" of the car)
2) the "wheels" would also "push" up on the springs
There's a reason games use them: I'll bet you that you'll write more code implementing your own physics than that extra layer of integration. Use the tools you have instead of reinventing the wheel. And as for only applying it to the vehicle, you can just do that. Nobody says you have to make all objects in your game respond to physics.eye776 wrote:@ACE247, slavik262:
Because a physics engine requires an extra layer of integration, and, for this particular game I don't want to recode the collision for EVERYTHING ELSE apart from the vehicle?
@slavik262:
I can't use a physics engine for this one, because the vehicle (not a race car) is not exactly supposed to flip over (Standard ray-cast cars flip over A LOT).
Writing the necessary motion constraints for this task (any examples here ?) is a much harder/time consuming task (Bullet is a bit easier, but still...) and
this project doesn't warrant the effort.
As a side joke if I had the time I WOULD rewrite it from scratch.
Anyway, I'll try some simple spring modeling (constrained by hand not to make the vehicle take-off on every bump) and see if that works.
PS:
@ACE247
Decent vehicle ODE constraints are a college-degree math nightmare to write and deploy. At least if it's still the ODE I remember from my exploits with GLScene and ODE from quite a few years ago.
I can't use a physics engine for this one, because the vehicle (not a race car) is not exactly supposed to flip over (Standard ray-cast cars flip over A LOT).
Writing the necessary motion constraints for this task (any examples here ?) is a much harder/time consuming task (Bullet is a bit easier, but still...) and
this project doesn't warrant the effort.
As a side joke if I had the time I WOULD rewrite it from scratch.
Anyway, I'll try some simple spring modeling (constrained by hand not to make the vehicle take-off on every bump) and see if that works.
PS:
@ACE247
Decent vehicle ODE constraints are a college-degree math nightmare to write and deploy. At least if it's still the ODE I remember from my exploits with GLScene and ODE from quite a few years ago.
Its obvious you haven't read my first post correctly. I said irrOde.eye776 wrote:@slavik262:
PS:
@ACE247
Decent vehicle ODE constraints are a college-degree math nightmare to write and deploy. At least if it's still the ODE I remember from my exploits with GLScene and ODE from quite a few years ago.
Makes things so much easier.
Sorry for not answering sooner.
I did notice you said irrODE, as I was stating irrODE (ODE) has a very bad default vehicle. I would need to write advanced constraints for it just to keep it from flipping over too often.
Since I'm VERY bad at college level math (I'm a CS student and have a s***load of failed math exams), the constraints would be unprofessional, act as bad as if they were written from scratch and (as a bonus) take a lot of processing time.
Physics engines are great when bought in commercial packages with constraints (Unity, Torque) or tightly woven SDK's (PhysX, Havok, Newton), but a nightmare to customize and use when standalone (ODE, Bullet).
I did notice you said irrODE, as I was stating irrODE (ODE) has a very bad default vehicle. I would need to write advanced constraints for it just to keep it from flipping over too often.
Since I'm VERY bad at college level math (I'm a CS student and have a s***load of failed math exams), the constraints would be unprofessional, act as bad as if they were written from scratch and (as a bonus) take a lot of processing time.
Physics engines are great when bought in commercial packages with constraints (Unity, Torque) or tightly woven SDK's (PhysX, Havok, Newton), but a nightmare to customize and use when standalone (ODE, Bullet).