Files
2026-02-18 00:08:49 +02:00

21 lines
386 B
C#

using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class Swing : MonoBehaviour
{
private Rigidbody _rb;
[SerializeField] private float torque = 30f;
void Awake()
{
_rb = GetComponent<Rigidbody>();
}
void Start()
{
_rb.WakeUp();
_rb.AddTorque(transform.right * torque, ForceMode.Impulse);
}
}