implementing a collision system #21083
Unanswered
itzRealDuck
asked this question in
Q&A
Replies: 1 comment 1 reply
-
There are external physics crates that can help: |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
hello, so this is my first time using bevy so i dont have a lot of experience, so i apologize if my code is unoptimized or if my question is stupid, anyways i tried my best to implement 3d collision for objects by followivg the 2d collisions example with a bit of editing (https://bevy.org/examples/math/bounding-2d/), and basically the steps i did it in was as following:
spawn cube and sphere
asign each different structs with different Aabb3d(for example the cube has its own specific Aabb3d component struct, and the circle and other objects share one struct in each spawn)
i then make a function and query each of the structs
then i iterate over them and get their aabb values and use the intersection method to check if there is intersection between the volumes and then do everything else to prevent it(for now i just print "intersection just for testing)
Beta Was this translation helpful? Give feedback.
All reactions