can you help me with my code?
my script is this: using UnityEngine; using System.Collections;
public class isKinematic : MonoBehaviour { public Rigidbody rb;
void EnableRagdoll() {
rb.isKinematic = false;
rb.detectCollisions = true;
}
void DisableRagdoll() {
rb.isKinematic = true;
rb.detectCollisions = false;
}
void Start() {
rb = GetComponent<Rigidbody>();
if (Ball.Touching("3dPin"))
EnableRagdoll();
}
}
i know whats wrong: if (Ball.Touching("3dPin"))
but how do i fix it? (c sharp)link text
Answer by TechnoFlame213 · Aug 13, 2017 at 05:09 AM
whoops some of the code is out of the box!
using UnityEngine; using System.Collections; public class isKinematic : MonoBehaviour { public Rigidbody rb; void EnableRagdoll() { rb.isKinematic = false;
rb.detectCollisions = true; } void DisableRagdoll() { rb.isKinematic = true; rb.detectCollisions = false; }
void Start() { rb = GetComponent(); if (Ball.Touching("3dPin")) EnableRagdoll(); } }
Your answer
![](https://koobas.hobune.stream/wayback/20220612132611im_/https://answers.unity.com/themes/thub/images/avi.jpg)
Follow this Question
Related Questions
How to get the radius of a shpere trigger(collider) 1 Answer
pulling gameobjects across collider C# 3 Answers
getComponent().Velocity always returns 0? 2 Answers
Unity 2D colliders not triggering,Unity 2D collider not triggering 0 Answers
Best way to implement a trap that activates as player runs past it? 1 Answer