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(); } void Start() { _rb.WakeUp(); _rb.AddTorque(transform.right * torque, ForceMode.Impulse); } }