c# - Unity 2D line collider -


i try following: have point @ -4x-4y , point b @ 4x 0y. want make colliding line position position b.

i tried linerenderer can't line collide other 2d objects.

enter image description here

my other tought calculate center of points , rotation , box collider seems complicated , hacky.

is there simple way achieve this?

thanks in advance

you can use polygoncollider2d, it's automatically create collider sprites, , if not satisfied results, can edit clicking edit collider in inspector, or trought unity's api.


Comments

Popular posts from this blog

php - failed to open stream: HTTP request failed! HTTP/1.0 400 Bad Request -

java - How to filter a backspace keyboard input -

java - Show Soft Keyboard when EditText Appears -