Car racing

Posted By: William

Car racing - 05/27/04 11:23

Okay, so it sounds like once I get the update installed, the forces will go wacky! But, I guess i'll just have to tweak em, so it shouldent be too hard?

Currently, the vehicle script i'm creating that uses purely forces is coming along so-so. It is in no way ready for Public Release, but I really need some help on a certian issue with it. Highspeed turning is currently very hard for me to fix, I have tried a variety of solutions, so far the best of them was by just adding an opposite force while driving, but this had its problems. Then I decided to check out that link Marco had, I spent tons of hours trying to implement a solution to this by looking at 2d vehicle physics equations I've found, but they all seem to not work right(perhaps I made a little mistake, I have my previous work commented out in the script). Also, I want to thank Rhuarc especially for helping me with this script. If you are going to implement this script, remember to have your pointers set right, and also have the same font as what I used for debugging. If you do not want any of the debugging information on-screen, then just delete all the stuff about strings and fonts! Please report any of your findings here. The link that I gained the most information from was Information . This link has lots of information on highspeed turning, but I could not seem to get it working(my results are commented out if u wanna see what I did, I even have a little "tutorial" lol). I guess i'm calling on some experts like Marco and Fastlane right now, or anyone else who is familar with the physics engine. Please try to think of a solution for the Highspeed turning, everything else I will be able to do on my own fine(and will post a nice clean script when its done). Thanks ahead of time, hopefully we can get a solid script that works so that vehicles can move purely using forces, then everyone will benefit!

P.S - The codes extremely messy, but most of it's commented so you shouldn't have too much trouble. Please, ask me if you have any trouble.

Thanks for hosting it for me Fastlane! Please look at the post under this one for the download link.
Posted By: fastlane69

Re: Bug note - 05/27/04 11:53

DAMN BOY!

Look, let me host this for you.
Delete that mess man!

Williams Vehicle Code
Posted By: Marco_Grubert

Re: Bug note - 05/28/04 04:50

There are lots of undefined variables:
p_player, p_fr_tyre, mdl_car, mdl_tyrefr, etc.
I tried tweaking the code to make it work with my car model, but the car just sits there with a broken axle and won't move
Posted By: William

Re: Car racing - 05/28/04 05:53

Oh darn... those variables are in my globals script which I forgot to add. It does work perfect for me. It's just that I should have tried it without any of my other external scripts, sorry about that. I'll post some simple directions later tonight, which will get you up and running quickly!
Posted By: poloman

Re: Car racing - 05/28/04 16:55

Please, 2bit, can't wait to see your vihicle scripts.
© 2024 lite-C Forums