Search Unity

  1. 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
  2. Ever participated in one our Game Jams? Want pointers on your project? Our Evangelists will be available on Friday to give feedback. Come share your games with us!
    Dismiss Notice

AVC - Arcade Vehicle Controller

Discussion in 'Assets and Asset Store' started by Carwashh, Nov 22, 2019.

  1. Carwashh

    Carwashh

    Joined:
    Jul 28, 2012
    Posts:
    479
    Arcade Vehicle Controller (AVC) is a simple vehicle controller asset allowing you to create any type of vehicle – car, hover car, motorbike, boat. The customizable arcade-y feel to the vehicles gives a fun, satisfying, player experience to your vehicles.

    Included is a Vehicle Builder editor window, which allows you to setup a new vehicle in seconds! Just link the required objects and fill in the details, press a button and you’ve got your new vehicle!

    The values for a vehicle (speed, turning, drifting, etc.) are saved in a ScriptableObject, meaning you can re-use the same values for hundreds of different vehicles, and only have to tweak them in 1 place.

    Asset Store link: https://assetstore.unity.com/packag...arcade-vehicle-controller-157860?aid=1101lGt5

    [PC DEMO][WebGL Demo]


     
    Last edited: Mar 2, 2020
    seppeq and StevenPicard like this.
  2. Carwashh

    Carwashh

    Joined:
    Jul 28, 2012
    Posts:
    479
    v1.8
    - Fixed all console warnings

    --------------------
    v1.7
    - Improved ground check, allowing for the sphere collider to be resized
    - Removed unused param from VehicleEffects method
    - Stopped setup launcher opening after any package has imported, it only opens when AVC is imported
    - Improved vehicle movement to make the camera follow much smoother

    --------------------
    v1.6
    - Added setup window to make layer setup unmissable
    - Removed unused var from editor window

    --------------------
    v1.5
    - Added the option to disallow vehicles turning when stationary
    - Added a LayerMask to the grounded check
    - Fixed cinemachine target follow stutter. This happened because the target was being updated in FixedUpdate() and LateUpdate(), now everything is in FixedUpdate()

    --------------------
    v1.4
    - Added new Vehicle Setting to stop vehicles sliding down slopes sideways. This can be toggled on/off

    --------------------
    v1.3
    - Addeed boost
    - Improved movement code

    --------------------
    v1.2
    - Added support for Unity 2019.3
    - Added strafing
    - Added new vehicle example (Helicopter) to show how to use strafing
    - Added two new methods for speed penalties when changing surface Fixes/ Improvements
    - Raycast for grounded is now set dynamically, allowing for the vehicle model to be higher off the ground - Removed left over collider from all prefabs and it is no longer added when creating a new one

    --------------------
    v1.1
    - Fixed all demo scenes and prefabs.
    - Removed wrongly included items.
    - Removed post processing dependency, so it doesn't conflict with/mess up your projects post processing setup.

    --------------------
    v1.0 - First release
     
    Last edited: May 4, 2020
  3. Carwashh

    Carwashh

    Joined:
    Jul 28, 2012
    Posts:
    479
    AVC has just been approved and is now available on the Asset Store!
     
  4. Carwashh

    Carwashh

    Joined:
    Jul 28, 2012
    Posts:
    479
    I've just found out that all the prefabs have lost their references, so the demo scene and all the examples are currently broken - however, everything else works fine (you can create your own vehicles and drive them around instantly).

    I'll be working on getting this sorted tonight when I get home from work - if you've bought AVC and require help with this before I get the asset store updated feel free to post here/ email me : support@enigma23.co.uk

    [Edit 02/12/19: new version with all this fixed has been submitted]
     
    Last edited: Dec 2, 2019
  5. Carwashh

    Carwashh

    Joined:
    Jul 28, 2012
    Posts:
    479
    v1.1 is out now, which fixes all the issues from v1 - I'd suggest deleting v1 if you already have it downloaded.

    Let me know if you run into any other problems.
     
    ikemen_blueD likes this.
  6. AngelBeatsZzz

    AngelBeatsZzz

    Joined:
    Nov 24, 2017
    Posts:
    214
    Hi Carwashh, I tried the demo and I really like this controller.
    I have a question, is there a drift function?
     
  7. Carwashh

    Carwashh

    Joined:
    Jul 28, 2012
    Posts:
    479
    Hi there,

    Glad you liked it!

    The vechile settings use a ScriptableObject for the data (see attached image for an example that is included with the package), one of the settings is for drifting. It uses a normalized value, where 0 is no drifting at all and 1 is lotsa drift. You don't need to do anything special with your code to achieve drift, just tweak this value to what you're happy with.
     

    Attached Files:

    AngelBeatsZzz likes this.
  8. AngelBeatsZzz

    AngelBeatsZzz

    Joined:
    Nov 24, 2017
    Posts:
    214
    Hi Carwashh, I found two problems in the demo scene.
    1, The car will fall off the bridge after starting the game.
    2, Change the "Max Speed" of "VehicleBehaviourSettings_Car" to 40, and the car will jump after going straight on the flat ground for a while.

    Does the controller have a brake function? I didn't find it.

    I tested the Drift value, it is more like changing the speed of the car turning. I think the drift should be to let the car go from one point to another, as if there is a force added to the car when turning.
     
    Last edited: Dec 15, 2019
  9. Carwashh

    Carwashh

    Joined:
    Jul 28, 2012
    Posts:
    479
    Hiya,

    1- I'll need more info than that. If you fall through the floor, then that's a problem, but if you mean you can make it off the side ... that isn't a problem, use R to reset the vehicle position.

    2- This is 'caused by imperfections in the 3D, not the code. I'm not an artist, but I'll see if I can fix the stitching - thanks.

    3- The docs and ExampleInput.cs both show how to break, there is a ControlBrake() method.
     
    AngelBeatsZzz likes this.
  10. AngelBeatsZzz

    AngelBeatsZzz

    Joined:
    Nov 24, 2017
    Posts:
    214
    Thanks for the reply.

    I use 'Unity 2019.3.0b12' + 'AVC 1.1'. After opening the 'VehicleControllerSampleScene' scene and starting the game, all cars will drop off the bridge. I think this may be a problem with the bridge collider, which is not a problem for me, but I think you may want to know this.
     
  11. Carwashh

    Carwashh

    Joined:
    Jul 28, 2012
    Posts:
    479
    Thanks for the further info, I'm waiting until 2019.3 is actually released before I support it. Until then, it's as easy as throwing a mesh collider on the gameobject in the scene.
     
    AngelBeatsZzz likes this.
  12. HelloNan

    HelloNan

    Joined:
    Aug 10, 2012
    Posts:
    18
    Does use unity wheel collider?
     
  13. Carwashh

    Carwashh

    Joined:
    Jul 28, 2012
    Posts:
    479
    No. I've always had difficulty with the wheel colliders, could never get them working easily or giving the feel that I was happy with, so with this asset I stayed away from them and tried to make setting up of a vehicle extremely easy/ plug and play.

    Currently the wheels don't interact with the environment, but I'm working on this for an update.
     
  14. DiscoFever

    DiscoFever

    Joined:
    Nov 16, 2014
    Posts:
    286
    Hi, can you provide a WebGL demo ?
     
  15. Carwashh

    Carwashh

    Joined:
    Jul 28, 2012
    Posts:
    479
  16. andyz

    andyz

    Joined:
    Jan 5, 2010
    Posts:
    1,287
    Looks a lot like Kenny's vehicle controller with similar issues - car does not hold position on a slope (even when sideways) and a lot of sideways slide by default. There is certainly a place for the right arcade vehicle controller though...
     
    Carwashh likes this.
  17. adampound

    adampound

    Joined:
    Jul 14, 2014
    Posts:
    26
    Can the vehicle flip when in air?
     
  18. Carwashh

    Carwashh

    Joined:
    Jul 28, 2012
    Posts:
    479
    AVC has been updated, the demos have also been updated with the Helicopter example.

    v1.2
    - Added support for Unity 2019.3
    - Added strafing
    - Added new vehicle example (Helicopter) to show how to use strafing
    - Added two new methods for speed penalties when changing surface Fixes/ Improvements
    - Raycast for grounded is now set dynamically, allowing for the vehicle model to be higher off the ground - Removed left over collider from all prefabs and it is no longer added when creating a new one
     
  19. Carwashh

    Carwashh

    Joined:
    Jul 28, 2012
    Posts:
    479
    Sorry for the slow reply, I didn't get any notifications about these two posts.

    I haven't been able to flip a vehicle.

    I'll try and look into this, see if I can sort it out.
     
  20. Carwashh

    Carwashh

    Joined:
    Jul 28, 2012
    Posts:
    479
    Update v1.3 is out now

    v1.3
    - Addeed boost
    - Improved movement code
     
  21. DavidSWu

    DavidSWu

    Joined:
    Jun 20, 2016
    Posts:
    183
    Very nice!
    Have you tried implementing touchscreen control inputs for mobile or tablets?
     
  22. Carwashh

    Carwashh

    Joined:
    Jul 28, 2012
    Posts:
    479
    I have not, but the input method doesn't matter, just call the Accellerate method from your input class.
     
  23. Carwashh

    Carwashh

    Joined:
    Jul 28, 2012
    Posts:
    479
    v1.4
    - Added new Vehicle Setting to stop vehicles sliding down slopes sideways. This can be toggled on/off

     
  24. Dima_Timofeenko

    Dima_Timofeenko

    Joined:
    Aug 4, 2015
    Posts:
    1
    Hello. Thank you for asset, its very cool. I found little visual bug which appears on the mobile phone. Often car twitches at speed, is trying to roll over. I fixed that. I think raycast "NearGround" hit to self collider. I added layer mask, and move this code to LateUpdate. Im not debug raycast hit on mobile, just did it and this fixed problem.
     
    Carwashh likes this.
  25. Carwashh

    Carwashh

    Joined:
    Jul 28, 2012
    Posts:
    479
    AVC has been updated to v1.5, if you're seeing your vehicle move incredibly slowly/ not at all you'll need to setup the layers for the ground as required - check the documentation or fire me an email.

    Update notes:

    v1.5
    - Added the option to disallow vehicles turning when stationary
    - Added a LayerMask to the grounded check (thank you @Dima_Timofeenko )
    - Fixed cinemachine target follow stutter. This happened because the target was being updated in FixedUpdate() and LateUpdate(), now everything is in FixedUpdate()
     
  26. 3CHO12

    3CHO12

    Joined:
    Apr 4, 2015
    Posts:
    14
    Looks cool. Is there any audio option coming?
     
  27. Carwashh

    Carwashh

    Joined:
    Jul 28, 2012
    Posts:
    479
    I made AVC to use in my own racing game, so I will be doing engine audio, but it is probably a few months away yet. At the moment I'm hoping to do it in such a way that AVC isn't required and can take in any input for a good engine sound, if this happens it'll be sold as a separate asset - however, these are not concrete plans as I haven't started development/ planning on this part yet.
     
    3CHO12 likes this.
  28. Carwashh

    Carwashh

    Joined:
    Jul 28, 2012
    Posts:
    479
    I've updated to v1.6, now, after importing a new window will be displayed to help setting up the ground layer, this makes it simple and obvious that this step is required.

    Information on how to do this step manually is available in the documentation, on page 3.

    v1.6
    - Added setup window to make layer setup unmissable
    - Removed unused var from editor window

    upload_2020-4-20_10-45-13.png
     
  29. wulcat

    wulcat

    Joined:
    Aug 19, 2019
    Posts:
    4
    Hey, there's an issue where the vehicle (all (easy to see on Car and Boat)) jitters while drifting round and round. Thought It was cinemachine so I tried out different camera controller and simple camera follow as well. It can be viewed on your WebGL build as well

    To Reproduce:
    1. Cap the FPS to 30-60 (mobile).
    2. Change the view of the camera (2nd mode provided by you)
    3. Keep Drifting (Left/Right arrow + Forward)/(A/D+W)
     
  30. Carwashh

    Carwashh

    Joined:
    Jul 28, 2012
    Posts:
    479
    What version of AVC are you using?

    It'll be happening in the WebGL version because of cinemachine, I don't update the demos for every version and the current demo versions are from before I improved the stuttery camera movement (or so I thought..)
     
  31. wulcat

    wulcat

    Joined:
    Aug 19, 2019
    Posts:
    4
    The latest one 1.6
     
  32. Carwashh

    Carwashh

    Joined:
    Jul 28, 2012
    Posts:
    479
    I've improved it, you no longer see the vehicle stutter, however, the skid marks disappearing is the only bit I can notice stuttering now. Need to take some time to look at this, not sure how to sort this bit out.

    https://gyazo.com/a51851f3cbaa65747241e276c1b179a1
     
    wulcat likes this.
  33. wulcat

    wulcat

    Joined:
    Aug 19, 2019
    Posts:
    4
    Thanks a lot, but I still cant @Carwashh see updated version on store
     
  34. Carwashh

    Carwashh

    Joined:
    Jul 28, 2012
    Posts:
    479
    I haven’t pushed the updates yet, I still need to double check everything is ok before I do.

    It usually takes Unity ~24hrs to approve it too, it’s also weekend, so (I believe) they don’t do reviews.
     
    wulcat likes this.
  35. Carwashh

    Carwashh

    Joined:
    Jul 28, 2012
    Posts:
    479
    v.17 is now live, changelog below. I'll get around to updating the demos on itch.io ASAP.

    v1.7
    - Improved ground check, allowing for the sphere collider to be resized
    - Removed unused param from VehicleEffects method
    - Stopped setup launcher opening after any package has imported, it only opens when AVC is imported
    - Improved vehicle movement to make the camera follow much smoother
     
  36. wulcat

    wulcat

    Joined:
    Aug 19, 2019
    Posts:
    4
    4 functions in the fixed update from update thanks a lot!!! :p fixes the jittery issue
     
  37. Carwashh

    Carwashh

    Joined:
    Jul 28, 2012
    Posts:
    479
    Another update is now live, there were a few warnings in the console (mostly from the Example classes) because the variables are assigned in the inspector, these are now hidden. There should be no console warnings from AVC.

    v1.8
    - Fixed all console warnings
     
  38. Elharter

    Elharter

    Joined:
    Sep 20, 2015
    Posts:
    45
    Hey,
    there is no possibility (WebGL) or Videos to check out the car behaviour @ little jumps, ramps and something.....i would like to see how the physics are working if the car isnt jumping straight over a ramp for example.

    Small jump, big jump, jump while driving a small turn at the end of ramp, landing behaviour,etc.
    And especially a 90degress ramp/jump is very very interesting to see if the car jumps in the air and comes exactly back to the ramp.
    Could you provide a example-video like this - or impliment objects in the demo?

    Did you realized the physics with 1 sphere collider in the middle?

    btw: great work!
     
unityunity