armory3d / armory

3D Engine with Blender Integration
https://armory3d.org/engine
zlib License
3.07k stars 315 forks source link

Rigid bodies parenting issue #1830

Open knowledgenude opened 4 years ago

knowledgenude commented 4 years ago

The object comes to its original position/rotation after clear parent parent_test.zip

Left object is with active physics, right object is without physics

Use WASD to rotate the parent, SPACE to toggle both objects parent mode

There is also an issue when you uncheck Keep Transform. For me the object should return to its original pos/rot after clear parent (same as active body is doing in the issue), anyway i am not familiar to transforms work. Is not better to remove "Keep Transform"? Maybe is better to store the object transform trough another way (in variable for example) and after remove its parent, set the desired transform (loc or rot)

knowledgenude commented 4 years ago

There is also an issue happening when the parent is set:

screenshot

parent_test.zip

Edit: tested it more and when the rigid body is parented while falling (or moving), the movement keep in some way. Maybe the physics of the rigid body should be desactived and actived depending on parent state. To check this issue rotate the triangle upside down and parent/unparent when the rb is falling