- Home /
Rendering Wireframes of FixedJoints
Is there a way to render the wire-frame geometry information of a FixedJoint because I am creating them at run-time and need to see how it is interacting with the other rigid bodies.
using UnityEngine;
using System.Collections;
public class StickyObject : MonoBehaviour {
FixedJoint joint;
void Start () {
}
void Update () {
if (Input.GetKeyDown(KeyCode.Delete)) {
if (joint != null) {
Destroy(joint);
joint = null;
}
}
}
void OnCollisionEnter(Collision c)
{
joint = gameObject.AddComponent<FixedJoint>();
joint.connectedBody = c.rigidbody;
}
}
Comment
Your answer
