unity3d - unity 2D 5.0: collision with colliders, one with "is trigger" checked and one with "is trigger" unchecked -
i beginner in unity 5.0.
it hard describe problem, included 3 images. please see following:
http://frankiegamescom.ipage.com/question.html
please help. thanks.
i don't think should changing istrigger property of car_player in code. looks better solution:
leave box colliders on car , road blocks not triggers. let grass's box collider trigger. 2d rigidbodies need on the road blocks , car. car should stop when hitting road block if you're moving correctly; rigidbody2d.addforce or velocity.
if using transform.translate then think need add rect.overlaps infront of car , check collisions manually.
edit: looking @ screenshots again, looks leaving cars istrigger false , leaving grass colliders istrigger true might solve problem. , maybe use ontriggerstay2d to pass multiplier drag.
Comments
Post a Comment