- Home /
Track collider 2dToolkit
hi. i have a track for a 2d racing game. i use 2D Toolkit for it. you know , 2d toolkit have an option for collider , Polygon. so i add a polygon collider to my track, but it is only for one side!!? how can i have 2 side??? in below image you can see a green collider for inner circle , NOW the Question IS how can i have a suitable collider for outer circle ??
Answer by Reizla · Nov 11, 2013 at 10:22 AM
I guess that you're checking and processing the actual on the vehicle (I guess you use one since I see a road)? If so, why not add a 2nd texture of your road, make the polygon for the outside of the road and tell 2D toolkit to use the INNER part as collider? Not sure that'll work, but if it does it seems like the easiest way ;-)
Answer by Ewan K · Nov 11, 2013 at 02:02 PM
You're not actually colliding with the road itself, but with anything except/outside the road. You might simply create two (or more) empty gameObjects with dummy textures for inner and outer sides of the road, add polygon colliders to them separately and disable texture renderer.
Your answer
Follow this Question
Related Questions
Strange Rigidbody behaviour 0 Answers
Internal collisions 1 Answer
Generation of meshcollider depending on the shape of the 2d sprite on collision dtection ?? 1 Answer
Animation lag 2D 0 Answers
Trigger Only For Player. 1 Answer