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.
Strafing now has it’s own tilt value in the vehicle settings Updates
Fixed minor typo in prefab builder help
Removed Cinemachine namespace include that snuck into VehicleBehaviour
v1.5 - 22nd May 2022 Added
Vehicle audio component added. This component is used for engine start, engine running, engine stop, drifting, collisions
Collision effects. Easily added particle effects for collisions.
Collision Manager component added. This component deals with the collision events and calls its own events to pass them to the new audio and effects components (OnVehicleCollisionEnter, OnVehicleCollisionExit, OnVehicleCollisionStay)
Drift settings are now a ScriptableObject. These are required for Vehicle Effects (drift tire marks/ smoke) and Vehicle Audio
Engine can now be toggled on/off, with an option to auto start (new events added for these - OnStartEngine, OnEngineStarted)
Tight/ loose ground follow option
Updates
Ground alignment has been greatly improved, following the contours of the ground much better than before
Vehicle will now rotate towards the ground as it falls through the air (optional, this can be toggled in the VehicleSettings)
VehicleSettings have been updated to add all the new features
Prefab builder tided up and new features added. UseBoxCollider is now forced to true, older setup is being phased out
Fixed
Now using OnGround raycast to accelerate, instead of NearGround as this allowed the vehicle to change direction and move in the air causing weird movement. This also lead to the tight/ loose ground follow option being added
Setting the position when a vehicle is using the box collider setup no longer ends up in the model spinning around
v1.22 - 26th April 2022
Fixed MaxSpeed not being reachable. MaxSpeed can now be as low as ‘1’ and move correctly. NOTE: With this update all your current speends may need lowering by 6.
General code tidy
Added new package for Unity v2021.3
v1.21 - 19th April 2022
Added the ability to turn the engine on/off. Auto start is on by default
Improved ground alignment
Moved some method calls out of Update() into FixedUpdate()
v1.20 - 12th February 2022
New Features
Added class to rotate additional wheels, allowing for more than 4 wheels
Added class to turn additional wheels, allowing for more than just the front two wheels to turn
Fixes
Fixed bug when adding trails after builder hasn’t found a wheel
Updates
Additional prefab builder setting saved that previously wasn’t
v1.19 - 10th August 2021
Added CurrentSpeed property to return the current speed as a float
Improved slope sliding
Fixed vehicles using the box collider setup not sliding down slopes
v1.18 - 4th August 2021
Added new vehicle setting ‘Slide Threshold’. This allows you to tweak when a vehicle will start sliding down a slope
v1.17 - 17th July 2021
UPDATE NOTE: This update may cause the VehicleBehaviour to lose the Rigidbody assignment. If your vehicles don’t move after updating, please re-assign the vehicles Rigidbody to the VehicleBehaviour component field ‘VehicleRigidbody’
Front wheels turn when stationary
Renamed property ‘PhysicsSphere’ to ‘VehicleRigidbody’
Moved all create items into AVC sub-menu
v1.16 - 16th May 2021
Added a new public jump method to VehicleBehaviour, use Jump(float) - where the float is the force to jump by
Added a new class ‘VehicleBehaviourLinker’ to make it easier to get the VehicleBehaviour - see the SphereRigidbody GameObject on the example vehicle prefabs for its use
v1.15 - 1st May 2021
Fixed the ground check, the size of the vehicle should now no longer matter
v1.14 - 16th April 2021
Added package for Unity v2020.3 (LTS)
Added touch screen controls example
Removed left over trigger colliders from prefabs
Fixed position of smoke on AI motorbike
No longer updating packages for 2020.1
v1.13 - 13th December 2020
Three wheel option now available - with example
Turning and strafing methods now accept floats instead of ints
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 - 1st March 2020
Added new Vehicle Setting to stop vehicles sliding down slopes sideways. This can be toggled on/off
v1.3 - 22nd Feb 2020
Addeed boost
Improved movement code
v1.2 - 9th Feb 2020
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 - 2nd Dec 2019
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.
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]
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.
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.
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.
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.
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.
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.
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…
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