Gamestudio Links
Zorro Links
Newest Posts
AlpacaZorroPlugin v1.3.0 Released
by kzhao. 05/22/24 13:41
Free Live Data for Zorro with Paper Trading?
by AbrahamR. 05/18/24 13:28
Change chart colours
by 7th_zorro. 05/11/24 09:25
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
1 registered members (AndrewAMD), 1,403 guests, and 6 spiders.
Key: Admin, Global Mod, Mod
Newest Members
AemStones, LucasJoshua, Baklazhan, Hanky27, firatv
19055 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Need some car related help, wierd bug #56662
10/01/05 08:12
10/01/05 08:12
Joined: Nov 2004
Posts: 113
canada EH!?
zammmm Offline OP
Member
zammmm  Offline OP
Member

Joined: Nov 2004
Posts: 113
canada EH!?
Hello, I got this wierd problem or bug when I try to drift or wrap my car around, the back wheels turn 90 degrees and if it goes past that it starts spinning and going out of control, I can not figure it out.
Has anyone ever encountered this or anything, I would think it is the joints problem, but Im not sure, Ill just post that code for now, please ask if you want to see something, I cant seem to get it to work.
Code:
function createRearLeftWheel ()
{
rearLeftWheel = my;
rearLeftWheel.shadow = on;
rearLeftWheel.pan += 180;
rearLeftWheel.scale_x = 1.5;
rearLeftWheel.scale_y = rearLeftWheel.scale_x;
rearLeftWheel.scale_z = rearLeftWheel.scale_x;
phent_settype (rearLeftWheel,ph_rigid,ph_sphere);
phent_setgroup (rearLeftWheel,2);
phent_setelasticity (rearLeftWheel,1,5);
phent_setfriction (rearLeftWheel,120);
phent_setmass (rearLeftWheel,130,ph_poly);
wheelConn [2] = phcon_add(ph_wheel,player,rearLeftWheel);
phcon_setparams1(wheelConn [2],rearLeftWheel.x,vector (0,0,1),vector (0,1,0));
phcon_setparams2(wheelConn [2],nullvector,nullvector,nullvector);
}

function createRearRightWheel ()
{
rearRightWheel = my;
rearRightWheel.shadow = on;
rearRightWheel.scale_x = 1.5;
rearRightWheel.scale_y = rearRightWheel.scale_x;
rearRightWheel.scale_z = rearRightWheel.scale_x;
phent_settype (rearRightWheel,ph_rigid,ph_sphere);
phent_setgroup (rearRightWheel,2);
phent_setelasticity (rearRightWheel,1,25);
phent_setfriction (rearRightWheel,80);
phent_setmass (rearRightWheel,100,ph_poly);
wheelConn [3] = phcon_add(ph_wheel,player,rearRightWheel);
phcon_setparams1(wheelConn [3],rearRightWheel.x,vector (0,0,1),vector (0,1,0));
phcon_setparams2(wheelConn [3],nullvector,nullvector,nullvector);
}




-- Send me a shout at zammmm@gmail.com, also got MSN messenger, Xbox Live, "random FIRE", Xfire, "zammmm" and Steam, "zammmm". --------------------
Re: Need some car related help, wierd bug [Re: zammmm] #56663
10/01/05 13:01
10/01/05 13:01
Joined: Jan 2004
Posts: 3,023
The Netherlands
Helghast Offline
Expert
Helghast  Offline
Expert

Joined: Jan 2004
Posts: 3,023
The Netherlands
try using ph_sphere instead of ph_poly on the wheels, you limited the hinges to not let it roll it's own axis over, so dont worry about that.

Code:
 
phent_setmass (rearLeftWheel,130,ph_sphere);
and in the toher function
phent_setmass (rearRightWheel,100,ph_sphere);



try it like this.

in my experience with physics (ragdolls, race cars, nascars, anything you can think of, even minigolf) i've found out ph_poly makes on impact objects "explode", i allways try to avoid it, only thing i use it on is my chassis.

regards,

Last edited by dennis_fantasy; 10/01/05 13:02.

Formerly known as dennis_fantasy
Portfolio - http://www.designorhea.com/
Project - http://randomchance.cherrygames.org/
Re: Need some car related help, wierd bug [Re: Helghast] #56664
10/01/05 19:50
10/01/05 19:50
Joined: Nov 2004
Posts: 113
canada EH!?
zammmm Offline OP
Member
zammmm  Offline OP
Member

Joined: Nov 2004
Posts: 113
canada EH!?
Well, I got rid of ph_poly completely out of my script, thanks for the heads but, but it still seems to do it. What its doing is actully when the front wheels and the body turn the back wheels stay implaced, and dont follow the vehicle, so if the car turned there still facing "straight" its like they grab to much and dont want to turn as fast as the rest of the car? wierd, any pointers?

Heres kinda a crude 10 second picture of what I think its doing.



Once I stop and wait a second or so, they go back to parallel with the body.

Re: Need some car related help, wierd bug [Re: zammmm] #56665
10/03/05 20:12
10/03/05 20:12
Joined: Sep 2003
Posts: 3,236
San Diego, CA
M
Marco_Grubert Offline
Expert
Marco_Grubert  Offline
Expert
M

Joined: Sep 2003
Posts: 3,236
San Diego, CA
Make sure you have the latest update of A6.
Other reasons for sticky wheels could be: high friction, high mass, high damping, high gravity.


Moderated by  HeelX, Spirit 

Gamestudio download | chip programmers | Zorro platform | shop | Data Protection Policy

oP group Germany GmbH | Birkenstr. 25-27 | 63549 Ronneburg / Germany | info (at) opgroup.de

Powered by UBB.threads™ PHP Forum Software 7.7.1