9aadd0cde7
The moment of inertia calculation for BoxShape is: ``` Vector3( (p_mass / 3.0) * (ly * ly + lz * lz), (p_mass / 3.0) * (lx * lx + lz * lz), (p_mass / 3.0) * (lx * lx + ly * ly)); ``` where the final line includes both the x and y extents. However, for CapsuleShape3D, CylinderShape3D, ConvexPolygonShape3D, ConcavePolygonShape3D, and HeightMapShape3D, the final line read `(p_mass / 3.0) * (extents.y * extents.y + extents.y * extents.y)`. I believe this is a mistake, considering the comment in each case mentions using an AABB approximation, which should follow the same approach as BoxShape. This change corrects the final line to include both the x and y components of the shape's extent. |
||
---|---|---|
.. | ||
audio | ||
camera | ||
physics_2d | ||
physics_3d | ||
rendering | ||
xr | ||
audio_server.cpp | ||
audio_server.h | ||
camera_server.cpp | ||
camera_server.h | ||
display_server.cpp | ||
display_server.h | ||
navigation_server_2d.cpp | ||
navigation_server_2d.h | ||
navigation_server_3d.cpp | ||
navigation_server_3d.h | ||
physics_server_2d.cpp | ||
physics_server_2d.h | ||
physics_server_3d.cpp | ||
physics_server_3d.h | ||
register_server_types.cpp | ||
register_server_types.h | ||
rendering_server.cpp | ||
rendering_server.h | ||
SCsub | ||
server_wrap_mt_common.h | ||
text_server.cpp | ||
text_server.h | ||
xr_server.cpp | ||
xr_server.h |