- Home /
2D Multi-Wheel Collider/wheel, detecting Wheel Hits
My 2D game character is more of a ufo kind of thing that has 6 wheels around it and each wheel has 3 colliders.
As the ufo rotates one colliders simple would not be enough to hold it above ground, collide correctly, etc as it rotates in world space.
Now i want to rotate the wheels which i have already did, no problem doing so nice and smooth i can detect hits per wheel separately.
So my issue is detecting how many wheel colliders for that same wheel are actually hitting the ground.
I used code snippets from Unity's Car Tutorial to setup the wheels, if you are unfamiliar, basically all it does is grab editor specified transforms for the wheels, sets up a collider in 1 function, and another is called from regular update, where the wheel array is accessed (collider array) and for every wheel a wheel hit is tested in an if statement, rotation takes place, and on to the next wheel.
So any ideas on how i may access and test on per group basis rather than per wheel basis, would be appreciated.
Thnx
Your answer
Follow this Question
Related Questions
Embarrassing Wheel Collider Issue 2D 1 Answer
2D Game Movement script(W,A,S,D input only)? 1 Answer
2D game movement/jump issue 2 Answers
A node in a childnode? 1 Answer
How to add event to an object 1 Answer