1
\$\begingroup\$
Invalid AABB aabb      
UnityEditorInternal.InternalEditorUtility:CalculateSelectionBounds(Boolean, 
                                                                   Boolean)

I've got this error when I place any convex mesh collider in scene. What does it mean?

Game object also has rigidbody with Use Gravity = true and after run the scene i've got error:

transform.position assign attempt for 'gameobject1' is not valid. Input position is { NaN, NaN, NaN }.

\$\endgroup\$
  • \$\begingroup\$ have you any script that "calculates" the position of 'gameobject1'? Input position is { NaN, NaN, NaN } smell of some unconsistent calculation \$\endgroup\$ – dnk drone.vs.drones Aug 20 '15 at 6:29
  • \$\begingroup\$ There aren't any scripts at all. \$\endgroup\$ – Dmitriy Korobkov Aug 20 '15 at 6:44
1
\$\begingroup\$

It does not seem like you have made the mistake (If your gameobject has a transform) Try restarting Unity, rebooting your computer, reinstalling Unity.

\$\endgroup\$
  • \$\begingroup\$ Unity restart helped. \$\endgroup\$ – Dmitriy Korobkov Sep 11 '15 at 5:25
3
\$\begingroup\$

So the aabb is the axis aligned bounding box and so if it is giving you errors about it that means that unity couldn't calculate the aabb of an object because either it's too small or to big or has some kind of negative size or doesn't have a transform. Your other error is probably causing the invalid aabb error as the aabb does rely on the position of the object and is probably being thrown because you don't have a transform component on the object.

\$\endgroup\$
0
\$\begingroup\$
    HealthBar.GetComponent<RectTransform>().sizeDelta = new Vector2(InitialWidthHealthBar * Player.pInstance.Health / 
        Player.pInstance.MaxHealth,HealthBar.GetComponent<RectTransform>().sizeDelta.y );

This is the code that produced the same error.Where the Player.pInstance.MaxHealth is 0. It means 100 / 0 , which cause mathematical error.I changed the Value to 100.its Working now.and i read the same will happen with tranform too.

\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.