2 registered members (Akow, tomaslolo),
1,536
guests, and 12
spiders. |
Key:
Admin,
Global Mod,
Mod
|
|
|
Re: Car racing - Physics
[Re: Carloos]
#382289
09/06/11 21:52
09/06/11 21:52
|
Joined: May 2002
Posts: 7,441
ventilator
Senior Expert
|
Senior Expert
Joined: May 2002
Posts: 7,441
|
you can combine the advantages of both. most racing games do it this way. use a physics body for the car chassis. it will handle collisions nicely. use ray casting for the wheels and do your own wheel physics. there is a famous formula for wheel physics but i forgot its name. it should be easy to find with google though. edit: http://en.wikipedia.org/wiki/Hans_B._Pacejka(you can't simulate extremely fast spinning wheels with rigid bodies since the frequency of the simulation limits the possible rotational speed.)
|
|
|
Re: Car racing - Physics
[Re: ventilator]
#382294
09/06/11 22:27
09/06/11 22:27
|
Joined: Mar 2005
Posts: 514 Brazil
Carloos
OP
User
|
OP
User
Joined: Mar 2005
Posts: 514
Brazil
|
Ventilator !
So nice to "hear" something from you, I admire a lot your work.
if you say "use a physics body for the car chassis. it will handle collisions nicelly" I will ask you..
When I worked with newton, bodies physical controlled couldn´t be moved by, for example, c_move. I had to disable the physical entity, move it, then reenable the entity again to newton.
If I could only calculate the physics and let the engine ( PhyxS or even Newton ) manage the collisions, I think then I will have a chance.
One more thing... how would you analise PhysX compared to Newton nowadays ? I see you were working on a new Newton wrapper, is it already usable for vehicles ?
Thakyou a lot for your reply, and sorry if my questions look too noobish. ( in fact I think they really are )
Last edited by Carloos; 09/06/11 22:33.
|
|
|
Re: Car racing - Physics
[Re: ventilator]
#382344
09/07/11 12:41
09/07/11 12:41
|
Joined: Mar 2005
Posts: 514 Brazil
Carloos
OP
User
|
OP
User
Joined: Mar 2005
Posts: 514
Brazil
|
physx is mostly about marketing. it's not a better physics engine than newton or bullet.
That´s what I´m thinking of it by now. Yesterday I managed to assemble a car on it, and it feels worst then my old kart game with the old Newton... i´m really scared. you have to move the physics body with the forces that you calculate for your wheels.
I understand, but its too vague. Is somewhere an example of how is it possible to do ? Another thing that I noticed ( maybe it´s only me ) is that looks like the rotational "pivot" center of the car, is in the exact middle of the chassis. ( where my 0,0,0 is ) what makes the car turn horribly. I will try to change this to the exct center of the rear axis, to see if it gets better. Edit : Yes, it makes it looks much better...Is already possible to use the latest newton in A8 to make a car ? And sorry for ask, but, wich one is the latest Newton wrapper download ? I readed some posts about it, but I´m too losted to get a clue of how it is by now. Thankyou again.
Last edited by Carloos; 09/07/11 12:46.
|
|
|
Re: Car racing - Physics
[Re: ventilator]
#382533
09/09/11 04:21
09/09/11 04:21
|
Joined: Mar 2005
Posts: 514 Brazil
Carloos
OP
User
|
OP
User
Joined: Mar 2005
Posts: 514
Brazil
|
Hi all. Ventilator : I found the wrapper, but when I tested the car sample, the car fall across the ground. Will check it to see how it works. I´m really interested in the idea you gave, using physics to collisions and raycast and made the physics calculations by myself. If I can move the car only with code and use physics take care of all collisions, would be a dream coming true. Using PhysX, I got how to assemble the car and make it move reasonably. To help a lil bit, I placed a Panel to help set some physic aspects, and I´m thinkng in improve it with all the values needed : I dont liked too much the behaviour, and it was a pain to set physics values to achieve something at least aceptable. This is what I got by now : Youtube video of my PhisX car Cya.
Last edited by Carloos; 09/09/11 04:22.
|
|
|
|