_xiaofang/xiaofang/Assets/Obi/Samples/RopeAndRod/SampleResources/Scripts/RopeTenser.cs

15 lines
283 B
C#
Raw Normal View History

2024-12-18 02:18:45 +08:00
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class RopeTenser : MonoBehaviour
{
public float force = 10;
// Update is called once per frame
void Update()
{
GetComponent<Rigidbody>().AddForce(Vector3.down * force);
}
}