更新obi到7.1

This commit is contained in:
Bob.Song
2025-11-03 11:53:45 +08:00
parent d12e1bc495
commit 7cf7f545bc
1161 changed files with 158924 additions and 37802 deletions

View File

@@ -0,0 +1,33 @@
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
namespace Obi.Samples
{
public class CableCarController : MonoBehaviour
{
public ObiPinhole pinhole;
public float carSpeed = 1;
// Update is called once per frame
void Update()
{
float speed = 0;
if (Input.GetKey(KeyCode.W))
{
speed = carSpeed;
}
if (Input.GetKey(KeyCode.S))
{
speed = -carSpeed;
}
pinhole.motorSpeed = speed;
if (Input.GetKeyDown(KeyCode.Space))
{
pinhole.friction = pinhole.friction > 0.5f ? 0 : 1;
}
}
}
}