Search Unity

Constraints options have disappeared from Rigidbody

Discussion in 'Physics' started by Husnain95, Aug 26, 2015.

  1. Husnain95

    Husnain95

    Joined:
    Apr 2, 2015
    Posts:
    1
    I have added an editor script to unity which enables me to see the "Center of Mass" of my gameObjects. It works fine but since I have added it, constraints options(freeze position and freeze rotation) have disappeared from all my Rigidbodies (of all gameObjects).

    The image on left shows the rigidbody with constraints(before adding the script) and right one has no constraints(after adding script). I have also attached the script below.
    Before.PNG After.PNG
    Please tell me what's wrong with this because I need both the "Center of Mass" and Rigidbody constraints to work properly.
     

    Attached Files:

  2. MelvMay

    MelvMay

    Unity Technologies

    Joined:
    May 24, 2013
    Posts:
    11,492
    I suspect it's because the constraints are shown using an internal editor script and your script overrides that. I've just spoken to the editor guys and we should look at getting certain internal editors made public so that you can derived your editor from it and just override what you need.
     
    Schazzwozzer and Husnain95 like this.
  3. Peecha

    Peecha

    Joined:
    Dec 2, 2013
    Posts:
    23
    @MelvMay was there any progress done? Its been a quite while :D

    Stumbled upon this issue, because I also needed to see the center of mass. The constrains also dissapears in Unity 2022.3.

    Or is there a better way to visualize center of mass now?