Search Unity

  1. Unity 2020.1 has been released.
    Dismiss Notice
  2. Good news ✨ We have more Unite Now videos available for you to watch on-demand! Come check them out and ask our experts any questions!
    Dismiss Notice

Edy's Vehicle Physics - official thread

Discussion in 'Assets and Asset Store' started by Edy, Jan 19, 2012.

  1. alargastudio

    alargastudio

    Joined:
    Apr 18, 2017
    Posts:
    11
    sorry to ask mr edy, if you dont mind can you tell me where i should put this code in vehiclecontroller, thanks
     
  2. Edy

    Edy

    Joined:
    Jun 3, 2010
    Posts:
    1,820
    You may write a separate script that applies that torque to the vehicle's rigidbody. No need to modify the EVP code.
     
    alargastudio likes this.
  3. devotid

    devotid

    Joined:
    Nov 14, 2011
    Posts:
    421
    Edy I have been getting a few users having the golf cart will lose its "wheels" and resting on the primitive colliders. I have three similar vehicles that are setup the same way and they all "changed" at the same time. (I updated Unity from 5.6.3 to 2018.2)

    I cant get my own editor or my own builds to replicate it. :(



    I dont change anything at runtime on the vehicles. You can "tow" the cart home. When I tow it, I just make the rigidbody Kinematic and moves it position and rotation and then make it non kinematic again. Its a way to get the cart unstuck from cruising around the island. But I think the vehicle is already in this state when the game loads and users are trying to reset the cart home.... and it still is like the picture and not fixed.

    Any idea what I should start looking at? Layers? Maybe turn something on and off to get the wheel raycaster to reset?

    I started this project 3 years ago on 5.6.3 and just finally took an entire month and upgraded the project to 2018.2 (What a NIGHTMARE) and Edy physics were one of the only things that updated flawlessly. haha

    Thanks Edy. People are loving the vehicles in the game. So thank you again. :)

    Kevin
     
  4. Rowlan

    Rowlan

    Joined:
    Aug 4, 2016
    Posts:
    1,388
    Does EVP support headlights, i. e. lights for driving at night? If so, can someone please point me to the documentation? I couldn't find anything about it. Thank you very much!
     
  5. Edy

    Edy

    Joined:
    Jun 3, 2010
    Posts:
    1,820
    That's probably an issue with the vehicle collider. The collider should enclose at least the top half of the wheel collider component.

    Additionally, there's some ground behind the one that is visible? I've found that sometimes when there are two planes on top of another, the WheelCollider may miss the collision with the plane in the top and "look for the collision" of the bottom plane. This is usually fixed by splitting the ground colliders into smaller chunks.
     
  6. Edy

    Edy

    Joined:
    Jun 3, 2010
    Posts:
    1,820
    It's not included in the package but you could perfectly add headlights to your vehicles. Simply add two (or more) spot lights and a script for controlling them.
     
  7. Rowlan

    Rowlan

    Joined:
    Aug 4, 2016
    Posts:
    1,388
    Thanks, I already have that, but I was hoping more for an in-built solution with the head lights actually shining, similar to the brake lights. Same with tail lights. You know, changing the materials.
     
  8. devotid

    devotid

    Joined:
    Nov 14, 2011
    Posts:
    421
  9. Rowlan

    Rowlan

    Joined:
    Aug 4, 2016
    Posts:
    1,388
    Thanks, but I really like the solution which exists already for the brakes. I guess it's easy and straightforward to implement the same for the head lights and the tail lights. However I do prefer a solution in the asset itself, especially because it would be beneficial for other customers as well. It gives additional value with little effort. And for the other, I wouldn't want to re-implement it over and over whenever the asset changes.
     
  10. devotid

    devotid

    Joined:
    Nov 14, 2011
    Posts:
    421
    "the ground colliders"? You mean the terrain colliders. I dont use mesh for the ground. I use Unity terrain. Im not chunking up my terrain.... I am still adjusting. (Though Im not sure thats what you meant)

    I do have two Unity terrains overtop of each other but one doesnt even have a collider. Could the raycast still be catching it? Even without a collider?

    Side Note: The van in the background is just a static mesh. Golf Cart is the only Edys Car in the game.
     
  11. superoir

    superoir

    Joined:
    Jan 21, 2017
    Posts:
    1
    Not sure if this has been answered here, but does anyone have a free-body diagram or any notes on the car's forces? It doesn't need to be over the top details, but if anyone can point me to the right scripts or places that would help. I've seen in the documentation of modifying parameters, but not really going in depth on how they work. I'm specifically interested in what's being used for the drag forces and acceleration and if there's any wind resistance being applied or other forces I'd need to look into. Thanks in advance.
     
  12. Rowlan

    Rowlan

    Joined:
    Aug 4, 2016
    Posts:
    1,388
    The VehicleNitro.cs script of EPV isn't advertised enough, I only found it by accident. And had to try :D



     
    Last edited: Feb 9, 2020
  13. Rowlan

    Rowlan

    Joined:
    Aug 4, 2016
    Posts:
    1,388
    Done. It does make a difference :)



    Script is attached in case anyone else needs it.
     

    Attached Files:

    hopeful likes this.
  14. siumanchun

    siumanchun

    Joined:
    Apr 7, 2013
    Posts:
    36
    Hi !
    Please edys vehicle physics Please Add Manual gear And Car Ai ( Not simple AI ) !

    Thank You !
     
    Last edited: Feb 19, 2020
  15. KayJ_sh

    KayJ_sh

    Joined:
    Apr 14, 2019
    Posts:
    6
    Hi, I have several vehicles in my scene that can be driven. The user can switch between vehicles. Dependent on the chosen vehicle I want the inputs for the other vehicles to be blocked. My current approach is to enable/disable the VPStandardInput script. This works fine so far. But when starting the scene every script is enabled even though it is disable in the prefab. How is this possible? Even if I disable it in the Start() method it gets enabled before Update() is called. This behaviour is only related to this specific script. How can I get rid of this behaviour or what else can I do to disable the input for a specific vehicle?
     
  16. AntLewis

    AntLewis

    Joined:
    Feb 2, 2010
    Posts:
    200
    Hey @Edy, just bought the package, looks great. Quick question - I want the vehicle to accelerate automatially, with the player controlling the steering. In the Vehicle Standard Input, how should I go about this? I'm setting forwardInput to 1 but it's just idling. Thanks!
     
  17. Edy

    Edy

    Joined:
    Jun 3, 2010
    Posts:
    1,820
    AntLewis likes this.
  18. xsasoftware

    xsasoftware

    Joined:
    Sep 6, 2017
    Posts:
    18
    Hello, I bought your asset to use in a drift simulator. I want to make a score counter when you are in drift. Can you give me a point where i can hook to get a bool if i'm drifting or not in your vehicle controller code? Thank you :D
     
  19. Zebbi

    Zebbi

    Joined:
    Jan 17, 2017
    Posts:
    343
    Is it recommended to write a custom input controller for EVP or just use the included script? I can’t imagine I’d need any particular part of it changing, other than to be able to turn on and off input during scene intros or after finishing, and I’m not sure what others using EVP would generally do.
     
    devotid likes this.
  20. amynox

    amynox

    Joined:
    Oct 23, 2016
    Posts:
    105
    Any Update on this ?

    Thanks
     
  21. Edy

    Edy

    Joined:
    Jun 3, 2010
    Posts:
    1,820
    No, sorry. I haven't yet found a straightforward way of integrating multiple ground materials in a single terrain.
     
unityunity