Kinda lost the iteration aspect of this and just finished this prototype
up. So iteration 2 technically. Cleaned up some CarLogic code, did todos notably the brake force. Added the concept of wheels being on or off road and hampering acceleration if off road. Decided to do some camera work to get a better feel for acceleration/speed. Implemented Lap Timers, sections, and validation upon finishing a lap.
This commit is contained in:
@@ -0,0 +1,19 @@
|
||||
using System;
|
||||
using UnityEngine;
|
||||
|
||||
[RequireComponent(typeof(Collider2D))]
|
||||
public class Wheel : MonoBehaviour
|
||||
{
|
||||
public Action wheelOffRoad;
|
||||
public Action wheelOnRoad;
|
||||
|
||||
private void OnTriggerExit2D(Collider2D other)
|
||||
{
|
||||
wheelOffRoad?.Invoke();
|
||||
}
|
||||
|
||||
private void OnTriggerEnter2D(Collider2D other)
|
||||
{
|
||||
wheelOnRoad?.Invoke();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user