简体   繁体   中英

How to Check Multiple Object Collisions

So I want to have air time in my game, but I can't figure out how to check the collisions of all my wheels. I can only check whether a single wheel is colliding with the floor, not if all of my wheels are colliding with the floor.

Sorry for the poor wording, but the goal is to check to see if any of the four wheels are touching the floor.

There are several ways to achieve this, but one would be to create multiple Colliders for each wheel. Then you check whether each of these wheels is currently touching the ground. So you would have an extra Collider Object per wheel to check this.

Another way would be that if you have like one Object as car you could check the positions your object is having collisions with and calculate them but that would be way to complicated because I dont think performance will be that important for you.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM