Collision sensor on a rigged object does not work #1795
Replies: 5 comments 3 replies
-
I changed my approach according to: https://upbge.org/#/documentation/docs/latest/manual/manual/physics/introduction.html#mesh-deformations So now I have
I have a python component on the collision mesh, where in the However, as you can see in the picture below, the collision mesh gets updated to some sort of icosphere (top right in the picture, inside the red bordered cube). I haven't been able to determine why. Can someone help? Blend file: |
Beta Was this translation helpful? Give feedback.
-
I would change your approach,
unparent and update the position and rot of child shapes relative to the
bones, and reparwnt them to a compound root object
…On Thu, Feb 16, 2023, 8:08 AM wetoo-cando ***@***.***> wrote:
I changed my approach according to:
https://upbge.org/#/documentation/docs/latest/manual/manual/physics/introduction.html#mesh-deformations
So now I have
- A collision mesh (just a plane as the exact shape does not matter)
-- this is the grandparent (parent of the armature) -- physics type: dynamic
- An Armature that drives the hand mesh -- parent of the hand mesh
below -- physics type: "no collision"
- A hand mesh (which is the display mesh whose animation/deformation
is controlled by the Armature) -- physics type: "no collision"
I have a python component on the collision mesh, where in the update()
method the reinstancePhysicsMesh() function is called with the hand mesh
as argument. This should update the collision mesh to the deformed hand
mesh (at least to my understanding).
However, as you can see in the picture below, the collision mesh gets
updated to some sort of icosphere (top right in the picture, inside the red
bordered cube). I haven't been able to determine why.
Can someone help?
Blend file:
hands_low_poly_rig2.zip
<https://github.com/UPBGE/upbge/files/10757901/hands_low_poly_rig2.zip>
[image: image]
<https://user-images.githubusercontent.com/31558837/219420060-5e533f7a-71aa-4a5d-b729-ad89c4e8bfda.png>
—
Reply to this email directly, view it on GitHub
<#1795 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ABW3SWIWK75GLQPR42TGWE3WXZGHHANCNFSM6AAAAAAU6BFW5Q>
.
You are receiving this because you are subscribed to this thread.Message
ID: ***@***.***>
|
Beta Was this translation helpful? Give feedback.
-
Some progress. After unparenting the armature from the collision mesh, and correcting some scaling/offset issues, it seems the physics mesh for the hand is getting updated correctly as the hand grasps (deforms). Collision detection of the fingers passing through the object still doesn't work though. Blend file: |
Beta Was this translation helpful? Give feedback.
-
Works finally: |
Beta Was this translation helpful? Give feedback.
-
If you parent a child shape to a compound root, it absorbs the child
collision shape to its own,
This is far more efficient than rebuilding triangle mesh physics.
…On Fri, Feb 17, 2023, 7:38 AM wetoo-cando ***@***.***> wrote:
Works finally:
[image: hand-object]
<https://user-images.githubusercontent.com/31558837/219698282-bc1e995c-f96a-4c51-8b04-34a40e5b932a.gif>
—
Reply to this email directly, view it on GitHub
<#1795 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ABW3SWMQS6J3LAGF6X2SJPTWX6LQJANCNFSM6AAAAAAU6BFW5Q>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
Beta Was this translation helpful? Give feedback.
-
Hello,
I have a rigged hand object, for which I have set the Game Physics type to "Sensor". I have a collision sensor on this object inside logic bricks. When I press "Play", a grasping animation is triggered on the hand. The fingers then rotate and penetrate an icosphere near the palm. However, no collision with the sphere is detected.
Can someone please take a look. A zip file with the blend file inside is attached at the bottom (github does not allow directly attaching blend files to this discussion).
The blend file is here:
hands_low_poly_rig2.zip
Beta Was this translation helpful? Give feedback.
All reactions