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

Add collision shapes to imported animations in Godot #65

Closed
acs opened this issue Oct 15, 2022 · 4 comments
Closed

Add collision shapes to imported animations in Godot #65

acs opened this issue Oct 15, 2022 · 4 comments
Labels

Comments

@acs
Copy link
Contributor

acs commented Oct 15, 2022

In order to interact the characters in the game, we need to add collision shapes the meshes into animations.

During the import animations process it can be done.

And with animations created in Godot, also. Let's explore all in this ticket.

@acs
Copy link
Contributor Author

acs commented Oct 15, 2022

I have played a bit with it and the hints are working. Not sure yet howto combine both animations, the one with the mesh and the one with the collision shape. But I will research it later.

@acs
Copy link
Contributor Author

acs commented Oct 15, 2022

To play several animations at the same time we need to use the AnimationTree.

It seems it is the AnimationTree what we want to use: https://godotengine.org/article/godot-gets-new-animation-tree-state-machine.

But it seems we need to play a bit with it to understand the best approach. But our case is fairly simple: execute the normal animation and the collision animation at the same time. But they are imported from different files. Let's see how to combine all together.

@acs
Copy link
Contributor Author

acs commented Oct 16, 2022

Time to learn the Animation Tree. Let's create two simple animations in Godot and join them using the AnimationTree. A complete tutorial about it: https://docs.godotengine.org/en/3.5/tutorials/animation/animation_tree.html

@acs acs added the godot label Oct 19, 2022
@acs
Copy link
Contributor Author

acs commented May 7, 2023

I have tested that if you have an animated mesh, the collision shape related is also animated, so it works as expected: the collisions will be detected with the animated mesh. Cool!

@acs acs closed this as completed May 7, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant