Search Feedback

14
votes

Rigidbody: centerOfMass, inertiaTensor, inertiaTensorRotation API improvement

Physics

-

-

Currently, centerOfMass, inertiaTensor, inertiaTensorRotation are all exposed in the scripting API but not the inspector. User can set these properties via script. But these properties are also set by the Engine when for example a collider is attached to the gameObject.

If would be cleaner to instead have a mass property override API with variables like this:

Read-only defaultCenterOfMass
Read-only defaultInertiaTensor
Read-Only defaultInertiaTensorRotation
Read-Write overrideMassProperties
Read-Write userCenterOfMass
Read-Write userInertiaTensor
Read-Write userInertiaTensorRotation

It would also be nice to be able to have a "override mass properties" tickbox in the inspector, and upon the tickbox being ticked, value of userCenterOfMass, userInertiaTensor, userInertiaTensorRotation can be set in the Inspector.

Your opinion counts

Help us make things better. Share your great idea for improving Unity or vote for other people’s.

Log in to post a new idea

Categories

All

(9242)

2D

(233)

Ads

(42)

AI & Navigation

(70)

Analytics

(103)

Animation

(318)

Asset Store

(234)

Assets

(493)

Audio

(158)

Cloud Build

(98)

Collaborate

(33)

Docs & Tutorials

(202)

Editor

(2137)

Everyplay

(13)

Game Performance Reporting

(15)

General

(825)

Graphics

(783)

GUI

(371)

Input

(147)

Licensing

(76)

Networking

(163)

Physics

(346)

Platforms

(407)

Profiling & Optimization

(71)

Runtime

(164)

Scripting

(1030)

Terrain

(151)

WebGL

(132)