|
Car Physics
#31095
07/25/04 01:16
07/25/04 01:16
|
Joined: Dec 2001
Posts: 941 England
LoneWolf
OP
Developer
|
OP
Developer
Joined: Dec 2001
Posts: 941
England
|
I have a working car using the physics system but it does have some problems. At the moment i have the main body of the car which is connected to 4 suspension blocks using PH_SLIDER. The wheels are then connected to these suspension blocks using PH_WHEEL. The can moves when i rotate the wheels and the car turns when i turn the front wheels using phcon_setmotor. there are however some strange results i get. Sometimes the wheels seem to begin to fall off to the side etc even though they are on a slider. I think its because i am using PH_SPHERE when i set the wheels type and mass but PH_CYLINDER does not seem to work at all. The car will not move if i use PH_CYLINDER. Is there a bug that i am missing or am i doing it right using PH_SPHERE??? I might be able to upload a demo a bit later on if needed any ideas? thanks in advance
|
|
|
Re: Car Physics
[Re: Helghast]
#31097
07/25/04 05:38
07/25/04 05:38
|
Joined: Dec 2001
Posts: 941 England
LoneWolf
OP
Developer
|
OP
Developer
Joined: Dec 2001
Posts: 941
England
|
Thanks for the reply PH_POLY does not seem to work very well because the wheels arent perfectly round and i dont want to add any more detail to them if i can help it My wheel action looks like this Code:
action Car_Wheel { wait (1); phent_settype (my, PH_RIGID, PH_SPHERE); phent_setmass (my, 20, PH_SPHERE); phent_setdamping (my, 0, 100); phent_setfriction (my, 100); phent_setelasticity (my, 60, 5); phent_setgroup (my, 2); // ph_setgravity (vector (0, 0, -386)); // Set gravity for the world }
thanks again
|
|
|
Re: Car Physics
[Re: LoneWolf]
#31102
07/28/04 00:43
07/28/04 00:43
|
Joined: May 2004
Posts: 46 Hanover, Germany
JRAV
Newbie
|
Newbie
Joined: May 2004
Posts: 46
Hanover, Germany
|
Hi,
I'm also working on a car physics model, and also encountered problems with the hinge, such as wheels turning into the wrong direction or in worst case fly of the car.
The only solution seems to be setting friction to zero, at least in higher speeds,, then, however, you have the problem that when the car drives against another physics object (e.g. a 15kg cone), the car starts flying but not the cone.
I did not worry about suspension yet.
|
|
|
|