|
Conitec's Vehicle Physics: tyres colliding
#43740
04/03/05 13:26
04/03/05 13:26
|
Joined: Jul 2003
Posts: 1,300 Albury, Australia
James_Burke
OP
Serious User
|
OP
Serious User
Joined: Jul 2003
Posts: 1,300
Albury, Australia
|
Hi, I'm using Conitec's code for the vehicle physics (avaliable from the downloads page). I have replaced the standed 'buggy' with another model. The problem I have is when driving it becomes 'jumpy'. It seems that the tyres are colliding with the body of the vehicle. I would guess I've set it up wrong, because it works fine with the 'buggy', but maybe I've forgotten to set something? The body of the vehicle (in MED) The tyre of the vehicle (in MED) The vehicle set up (in WED) Thanks, James
|
|
|
Re: Conitec's Vehicle Physics: tyres colliding
[Re: Pappenheimer]
#43743
04/04/05 13:09
04/04/05 13:09
|
Joined: Aug 2001
Posts: 2,320 Alberta, Canada
William
Expert
|
Expert
Joined: Aug 2001
Posts: 2,320
Alberta, Canada
|
The origin for each wheel in MED should be exactly at the point where the axel connects to the wheel(on outside of wheel, axel side). If that doesnt fix it be sure that the tires and your chassis are all set within the same group - "phent_setgroup(my,2);" apply that for all wheels and chassis. Be sure your wheels are using spherical collision, it does not matter what your chassis is using. Finally, be sure that when your creating your wheels their verticie positions are right. Heres a quick example: Code:
//Put this in your chassis action after your chassis is applyed to physics engine vec_for_vertex(temp,my,952); ent_create(mdl_tyrefr,temp,FRInit); vec_for_vertex(temp,my,953); ent_create(mdl_tyrefl,temp,FLInit); vec_for_vertex(temp,my,950); ent_create(mdl_tyrebl,temp,RRInit); vec_for_vertex(temp,my,951); ent_create(mdl_tyrebr,temp,RLInit);
//An example of the wheels action, it is applied via its "my.x" position, so be sure your origin is right. action FLInit { phent_settype(my, PH_RIGID, PH_sphere); phent_setmass(my, massWheel, PH_sphere); phent_setfriction(my, fricWheel); phent_setdamping(my, 0,dampWheel); phent_setelasticity(my, 0, 100); // bounciness phent_setgroup(my, 2); my.FL_wheel_ID= phcon_add(PH_WHEEL, you, my); phcon_setparams1(my.FL_wheel_ID, my.x, vecUp, vecRight); phcon_setparams2(my.FL_wheel_ID, vector(0,0,0), nullvector, vector(suspensionERP, suspensionCFM,0)); } P.S - I would reccomend creating the wheels through script as shown above instead of placing them beside the chassis in WED. That way, its precise and instant. Just be sure to place a vert's at the end of each axel(in the middle...) and create the wheels according to the verticie positions.
|
|
|
Re: Conitec's Vehicle Physics: tyres colliding
[Re: Pappenheimer]
#43749
04/10/05 06:12
04/10/05 06:12
|
Joined: Jul 2003
Posts: 1,300 Albury, Australia
James_Burke
OP
Serious User
|
OP
Serious User
Joined: Jul 2003
Posts: 1,300
Albury, Australia
|
The tires need to be set to the right of the plane in MED EG: | -------|----- [---] | [---] = tire
|
|
|
|