Edy's Vehicle Physics - official thread

Hi there,

I’m starting this thread on Edy’s Vehicle Physics so you could post any questions, doubts or issues on the package.

Edy’s Vehicle Physics is a set of scripts for developing fun and realistic vehicles in your game with Unity 3D. It’s based on the Unity’s standard WheelCollider component, which provides a much better performance and accuracy than Raycast-based vehicle physics.

Documentation: Edy’s Vehicle Physics – Edy's Projects
Asset Store link: http://u3d.as/content/edy/edy-s-vehicle-physics/1Ba

Importing and setting up the package

Import the package normally into any project. A folder EVP will be created for all the imported scripts and assets.

4 Likes

I downloaded the November update and the gray car drives to the left when I push the up arrow. The truck will drive straight. The wheel colliders are still hard to setup. Aside from that everything else is good.

Note that the wheels can become misaligned as for the impacts, including hard contacts with the kerbs. Press shift-R to ensure that all damage is repaired and the wheels are realigned.

Hi Edy,

great news that you’ve added sound, but I can’t get it to work (the live demo won’t run on my machine even though I’m sure I’ve installed the 3.5 web player) - is this version going to be released when 3.5 is officially released?

Also, I can’t download V42.zip from your repository as it’s claiming an End of File error. (possibly dodgy upload?) I’ve redownloaded it several times and it’s not worked.

Keep up the great work

Hi!
The new version of the live demo its awesome ,and the sounds are great .Keep up the good work.
ps : I wrote a PM for you edy please read it.

Great work as always Edy. Btw for those using macs, many do not have page up and down :wink:

I created a copy of the project, removed the city from the project, and added my own “city”. Because I have the free version of Unity 3D, I can’t use the RenderToTexture command. I modified the bus mirror cameras and commented out any script lines that refer to the bus mirrors. I still get “Null Reference” errors. I want to use the mirror cameras with other vehicles. How can I do this? A suggestion: Have the driver put the automatic transmission in “Reverse”, “Neutral”, and “Drive”.

I found out that I forgot to add the Skidmarks and StartTestPoint assets to my “city”. That got rid of the “Null Reference” errors." What about the mirrors?

Maybe you can try re-installing the beta? Keep internet browsers closed during installation.

Yes, this version will be merged into the master branch (GIT) and updated at the Asset Store once the final Unity 3D 3.5 is released.

You are right, the V42.zip file was incomplete. Fixed!
Thanks!

Yes, but you have one of those intuitive and easy to remember combos of ctrl-alt-cmd-shift with up/down keys that emulate the page up and page down :stuck_out_tongue:

Beware of trying to find the right combo while you are writing a lot of text in a web form or you may hit the combo for “Back” instead and loose everything you had written… xD

lol exactly! exactly. I was wondering why I was watching some form of full screen movie theatre last time I tried.

Mirrors are automatically disabled when the references are not filled. Note how this is verified at the function UpdateMirrors in the CameraControl script.

The prefab Main at EdyVehiclePhysics\Prefabs contains the necessary objects for implementing the mirrors (GUITextures). In order for them to work properly you must first ensure that the CameraControl script at the MainCamera object contains the references for the mirror GUITextures that are children of Main (MirrorLeftTex, MirrorRightTex, MirrorRearTex):

808170--29802--$vehiclephysics-setupmirrors.png

Then, for each vehicle with mirrors you must:

  • Create and place the cameras that will actually provide the picture for each mirror of the vehicle. See the example cameras at the bus (Bus > MirrorCameras at the Hierarchy).
  • Reference those cameras at the CarCameras component of the vehicle. There you can find the references for placing the cameras for left, right and rear mirrors. Again, see the example at the Bus, CarCameras component at the root GameObject.

Ready. Use the ShowMirrors flag at the CameraControl component from MainCamera (see pic) to globally enable or disable the mirrors.

Edy, Do you use RenderToTexture? I think that free version of Unity 3.4 or 3.5 doesn’t have it.

Ooops… you’re right. The cameras providing the picture for the mirrors are rendering to a texture, which is displayed later as GUITexture. This requires Unity Pro.

You still could do a kind of mirror by using a plain camera attached to a vehicle and setting the camera’s normalize viewport rect to appear as a mirror. However you cannot flip the image horizontally with Unity Free.

How do I enable and disable the mirror cameras belonging to the car, truck, and bus when I press the [Page Up] and [Page Down] keys to select the vehicles? I made copies of MirrorCameras and renamed the copies bus-MirrorCameras, car-MirrorCameras, and truck-MirrorCameras. I did the same thing with MirrorL-Cam and MirrorR-Cam.

bus-MirrorCameras
bus-MirrorL-Cam
bus-MirrorR-Cam

car-MirrorCameras
car-MirrorL-Cam
car-MirrorR-Cam

Hey Edy,

Do you not have a C# version of this project?

Hey Edy,

How would you recommend altering forwardWheelFriction | rearWheelFriction values when the player drives through a trigger capsule?

(Trying to create different types of terrains, ie. slippery ice)

Cheers and Thank You!

Hi Edy, I have lost access to the project and I’m wondering if you would answer my email from hippocoder please :slight_smile: I tried the codaset link from the email from a while ago to redownload but codaset seems down?

Meanwhile I will use the old version as I wait patiently :slight_smile:

Same issue as hippocoder, emailed you my Paypal receipt along with a PM to explain whats going on :slight_smile:

P.M him, a while ago he was moved out the repo into his own server.