123456789101112131415161718192021222324252627282930 |
- using System;
- using System.Collections;
- using System.Collections.Generic;
- using UnityEngine;
- public class OverrideLeaningController : MonoBehaviour
- {
- private BicycleController bicycleController;
- private Rigidbody rigidbody;
- // Start is called before the first frame update
- void Start()
- {
- bicycleController = GetComponent<BicycleController>();
- rigidbody = GetComponentInChildren<Rigidbody>();
- bicycleController.offsetCollidersFromWheel = 2f;
- }
- // Update is called once per frame
- void Update()
- {
- //rigidbody.rotation = Quaternion.AngleAxis(bicycleController.CurrentLeaningAngle, rigidbody.transform.forward);
- }
- private void FixedUpdate()
- {
- //rigidbody.MoveRotation(Quaternion.AngleAxis(bicycleController.CurrentLeaningAngle, rigidbody.transform.forward));
- }
- }
|