Kit
Kit

Reputation: 37

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.

Upvotes: 0

Views: 114

Answers (1)

At Least Vision
At Least Vision

Reputation: 515

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.

Upvotes: 3

Related Questions