Compound Physics - Origin does not shift. #40340
Labels
No Label
Interest
Alembic
Interest
Animation & Rigging
Interest
Asset Browser
Interest
Asset Browser Project Overview
Interest
Audio
Interest
Automated Testing
Interest
Blender Asset Bundle
Interest
BlendFile
Interest
Collada
Interest
Compatibility
Interest
Compositing
Interest
Core
Interest
Cycles
Interest
Dependency Graph
Interest
Development Management
Interest
EEVEE
Interest
EEVEE & Viewport
Interest
Freestyle
Interest
Geometry Nodes
Interest
Grease Pencil
Interest
ID Management
Interest
Images & Movies
Interest
Import Export
Interest
Line Art
Interest
Masking
Interest
Metal
Interest
Modeling
Interest
Modifiers
Interest
Motion Tracking
Interest
Nodes & Physics
Interest
OpenGL
Interest
Overlay
Interest
Overrides
Interest
Performance
Interest
Physics
Interest
Pipeline, Assets & IO
Interest
Platforms, Builds & Tests
Interest
Python API
Interest
Render & Cycles
Interest
Render Pipeline
Interest
Sculpt, Paint & Texture
Interest
Text Editor
Interest
Translations
Interest
Triaging
Interest
Undo
Interest
USD
Interest
User Interface
Interest
UV Editing
Interest
VFX & Video
Interest
Video Sequencer
Interest
Virtual Reality
Interest
Vulkan
Interest
Wayland
Interest
Workbench
Interest: X11
Legacy
Blender 2.8 Project
Legacy
Milestone 1: Basic, Local Asset Browser
Legacy
OpenGL Error
Meta
Good First Issue
Meta
Papercut
Meta
Retrospective
Meta
Security
Module
Animation & Rigging
Module
Core
Module
Development Management
Module
EEVEE & Viewport
Module
Grease Pencil
Module
Modeling
Module
Nodes & Physics
Module
Pipeline, Assets & IO
Module
Platforms, Builds & Tests
Module
Python API
Module
Render & Cycles
Module
Sculpt, Paint & Texture
Module
Triaging
Module
User Interface
Module
VFX & Video
Platform
FreeBSD
Platform
Linux
Platform
macOS
Platform
Windows
Priority
High
Priority
Low
Priority
Normal
Priority
Unbreak Now!
Status
Archived
Status
Confirmed
Status
Duplicate
Status
Needs Info from Developers
Status
Needs Information from User
Status
Needs Triage
Status
Resolved
Type
Bug
Type
Design
Type
Known Issue
Type
Patch
Type
Report
Type
To Do
No Milestone
No project
No Assignees
4 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: blender/blender#40340
Loading…
Reference in New Issue
No description provided.
Delete Branch "%!s(<nil>)"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Compound_center_of_gravity_bug.blend
CompoundParentingPhysicsBug.blend
System Information
Any
Blender Version
2.7a
Short description of error
Origin does not shift on compound parent, and if a compound physics bounded item is parented to another compound, it leaves an invisible copy of the physics item of the child.
Exact steps for others to reproduce the error
press play
in example two the instructions are included in a text.
Changed status to: 'Open'
Added subscriber: @JacobMerrill-1
Added subscriber: @raco
In example two probably also another issue presents itself. In the Physics Properties both Cubes have 'Compound' checked. One is parented to the other, with 'Compound' checked in the Parent Actuator. This causes only the visible mesh to be updated. This is a different issue than the center of gravity bug. Just for your information.
Compound Physics - Origin does not shift, and if a compound physics bounded item is parented to another compound, it leaves an invisible copy of the physics item of the child.to Compound Physics - Origin does not shift.Added subscriber: @Moguri
In Bullet, the shape's transform matrix is it's "center." When adding objects to a compound shape, we don't adjust the parent's transform matrix. We could probably do this, but it requires digging through our physics code and possibly breaking games. A work around is to just create a small, invisible cube that you want to be your "center of gravity" and make it the root of the compound object. Any further objects added to the compound shape will be added relative to the root.
Added subscriber: @brita
Changed status from 'Open' to: 'Archived'
Closing this as "Won't Fix". The supplied work-around I think is acceptable, and trying to "fix" this bug could just result in more physics bugs (and possibly breaking existing games).
What about adding a command
joinCompoundObjects([list objects]) that does the for-mentioned
Get center of mass
Get Mass
Add compound object "Root"
Parent top of Hierarchy chain to root?
(or something smarter)
using a python function or class?
I agree it would get too messy, but I don't think this work-around is perfect enough, let alone fitted to add as a function to the API. I don't think you can't even call it a work-around, because the result is far from perfect. There's still the collision mesh of the added 'parent' object to consider. Even if this would be cube as small as a grain, its vertexes would still interfere with collision. Here's a blend to illustrate this: Compound_centroid_work-around_flaw.blend
A solution for this maybe would be to add compatibility with Material Physics for Compound objects. Currently if the Compound parent would have a material with Physics disabled, this would cause all added geometry to have no Physics enabled as well. So if Compound parenting would also take into consideration the Materials of the children, then we could have a complete work-around.