Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Option for KinematicBody to enable collision from its complete Node tree (grand children included) #1049

Closed
jcarlosrc opened this issue Jun 12, 2020 · 2 comments

Comments

@jcarlosrc
Copy link

jcarlosrc commented Jun 12, 2020

Describe the project you are working on:
Currently working on a 3d 3rd person project.

Describe the problem or limitation you are having in your project:
I need a collision shape structure that follow Player animations at least in a rough manner. I have set NodeAttachments to body parts to add their collision shapes. However, I can't make Player to inherit from KinematicBody class because it disables all except direct children collision shapes.

Describe the feature / enhancement and how it helps to overcome the problem or limitation:
I wish a kinematic body had the option to enable all grand children collision shapes.

Describe how your proposal will work, with code, pseudocode, mockups, and/or diagrams:
If we have the structure:
-kinematic 0

    • collision 0
    • kinematic 1
      • collision 1
    • kinematic 2
      • collision 2

then there should be an option for kinematic 0 to enable all collision 0, 1, 2 shapes for collision detection. In current implementation collision 1 and 2 are disabled.
If this enhancement will not be used often, can it be worked around with a few lines of script?:
I don't know a way to enable this in few lines of code
Is there a reason why this should be core and not an add-on in the asset library?:
It enables making collision to follow animations at least in a rough manner.

@KoBeWi
Copy link
Member

KoBeWi commented Jun 13, 2020

You can put all the colliders under your root node and use RemoteTransform2D to push the positions/rotations from animated parts.

Also related to #535 (and possibly duplicate)

@jcarlosrc
Copy link
Author

Seems that for each collision-node couple: I would need to first get collision - bone transformation differences for translation and rotation and apply it every frame after copying bone transformation. This way I could get collision to follow bone animation. This for each bone. Seems there should be a built-in option.

Yes, seems a duplicate of #535. Closing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants