Search Unity

Problem with component

Discussion in 'Scripting' started by Trild123787898, Feb 3, 2020.

  1. Trild123787898

    Trild123787898

    Joined:
    Dec 9, 2018
    Posts:
    206
    Component ConfigurableJoint. AngularXMotion, it costs Locked, I can’t understand why it does not want to install on Free?
    Code (CSharp):
    1.  
    2. using System.Collections;
    3. using System.Collections.Generic;
    4. using UnityEngine;
    5. using UnityEngine.UI;
    6. using UnityEngine.EventSystems;
    7. public  class mehanic : MonoBehaviour
    8. {
    9.    
    10.     public ConfigurableJoint confdet5;
    11.        void Start()
    12.     {
    13.        
    14.         confdet5 = gameObject.GetComponent<ConfigurableJoint>();
    15.     }
    16.    
    17.       void Update()
    18.     {
    19.         confdet5.angularYMotion = ConfigurableJointMotion.Free;
    20.     }
    21. }
     
  2. csofranz

    csofranz

    Joined:
    Apr 29, 2017
    Posts:
    1,556
    I don't understand a word of your question, but you seem to enquire about AngularXMotion, while your code references AngularYMotion.
     
    MadeFromPolygons likes this.