Skip to content

Instantly share code, notes, and snippets.

@Carwashh
Carwashh / ExampleTouchScreen.cs
Created November 22, 2020 10:53
Example class of how to use AVC with touchscreen input
using e23.VehicleController;
using UnityEngine;
using UnityEngine.EventSystems;
public class ExampleTouchScreen : MonoBehaviour, IPointerDownHandler, IPointerUpHandler
{
[SerializeField] VehicleBehaviour vehicleBehaviour;
[SerializeField] bool accelerate;
[SerializeField] bool brake;
[SerializeField] bool steerLeft;
@Carwashh
Carwashh / ExampleAINavMesh.cs
Created October 25, 2020 17:50
Example class to show how to interface Arcarde Vehicle Controller (AVC) with Unity's Navmesh
using e23.VehicleController;
using UnityEngine;
using UnityEngine.AI;
public class ExampleAINavMesh : MonoBehaviour
{
[SerializeField] private Transform target;
[SerializeField] private bool canDrive = false;
[SerializeField] private float minimalDistanceToNextWaypoint = 0.05f;
@Carwashh
Carwashh / ExampleInputSystem.cs
Last active April 17, 2022 16:04
Example class to show how to interface Arcarde Vehicle Controller (AVC) with Unity's new InputSystem
using UnityEngine;
using UnityEngine.InputSystem;
public class ExampleInputSystem : MonoBehaviour
{
[SerializeField] private VehicleBehaviour vehicleBehaviour;
[Header("Controls")]
[SerializeField] private PlayerInput playerInput;