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
Support collidable moving parts #2493
Conversation
…onVisitor, remove repetition in ModelBody
For a test case, I've got this...thing. http://paahdin.com/projects/pioneer/multicoll.7z |
It looks good, a lot cleaner too. Seems like you did a lot of tidying up in implementing it all :) Plus you got rid of a filthy global ;) |
You could test it by adding collision to hoop_stations, all it takes is one box moving in sync with the doors. I can't import the .daes properly into Blender. |
Hopefully this isn't waiting on me having time to test it by learning how to animate a spacestation door? :/ It looks good to go in and then someone will eventually be able to make use of it, and the new idle animations, in their new models or updating existing ones. |
Nah, I've just been short on time and brain for it. I'm going to read over it and probably merge it tomorrow. |
This is great! It occurs to me that its not a big step from here to being able to damage parts of the ship independently. We just need a separate hit counter per collision geom, right? :) |
About damn time, if I may say so.
From a modeller's point of view, you just name a piece of animated geometry "collision_d_whatever" (d for dynamic) and it'll be added as collidable instead of visible geometry. I recommend sticking to simple cubes, and only when they are really necessary, like space station doors.
Now, the implementation is a bit hairy... we need to to tie CollisionGeometry nodes (which may have a complex chain of transforms) into the collision system's Geom objects. To achieve this:
Limitations: the way collisions work in Pioneer, moving geoms won't push the linked geoms around. That'd be... physics. Like, if a ship extends an animated landing gear into a surface, it'll just go through, and only collide when the ship moves.
The dynamic collmeshes aren't visible in the modelviewer yet because that's tricky :(