Hello guys
so im making a script that when i press a particular key rigid body enables on a object
Im new to scripting and i wonder if you can help me finish this script
(sorry for my english because im Slovenian :3)
Hello guys
so im making a script that when i press a particular key rigid body enables on a object
Im new to scripting and i wonder if you can help me finish this script
(sorry for my english because im Slovenian :3)
How the hell are we supposed to know what you’re talking about when you don’t post this script you’ve “made”…
using UnityEngine;
using System.Collections;
public class RigidbodyTest : MonoBehaviour
{
void Update ()
{
if(Input.GetKeyDown (KeyCode.R))
rigidbody.isKinematic = !rigidbody.isKinematic;
if(!rigidbody.isKinematic && rigidbody.IsSleeping())
rigidbody.WakeUp();
}
}