Files
BABA_YAGA/Assets/Third Parties/Opsive/UltimateCharacterController/Demo/Scripts/Car/CarUserControl.cs
Scove 3e39117acc Consolidate third-party plugins into Assets/Plugins
Move and consolidate many third-party plugin files and metadata from various locations (notably Assets/Third Parties/Plugins 1 and scattered Opsive/Photon folders) into a unified Assets/Plugins directory. Includes DOTween, PrimeTween, Native/BackroomsNoise, Sirenix/Odin Inspector, and Opsive UltimateCharacterController/shared libs, plus updates to several .meta files and removal of obsolete installer/legacy files. This standardizes plugin layout and cleans up duplicate/obsolete assets.
2026-06-16 18:41:44 +07:00

27 lines
763 B
C#

namespace Opsive.UltimateCharacterController.Demo.UnityStandardAssets.Vehicles.Car
{
using UnityEngine;
[RequireComponent(typeof (CarController))]
public class CarUserControl : MonoBehaviour
{
private CarController m_Car; // the car controller we want to use
private void Awake()
{
// get the car controller
m_Car = GetComponent<CarController>();
}
private void FixedUpdate()
{
// pass the input to the car!
float h = UnityEngine.Input.GetAxis("Horizontal");
float v = UnityEngine.Input.GetAxis("Vertical");
float handbrake = UnityEngine.Input.GetAxis("Jump");
m_Car.Move(h, v, v, handbrake);
}
}
}