- Home /
Help! Line Renderer/Collider Split in Different Resolutions...
I think this is a pretty unique issue...
In the game, the player draws a line through different boxes, and each time the line passes through a box, a point is added to the line...the effect is that the player draws a jagged line anchored to different boxes (think connect the dots).
To achieve this, I have a Line Renderer with a capsule collider attached to the end of it, and each of the boxes also has a collider (the boxes are set to isTrigger = true). The problem: my solution works fine in one resolution but not in the other. The collider at the end of the line drifts away from the line when the game is started over in a different resolution. I have pictures if this isn't clear...
Working fine at 2436 x 1125: https://www.dropbox.com/s/t7ivfeo1jq4a7re/1pic.png?dl=0
Collider separate from line at 1334 x 750: https://www.dropbox.com/s/tkmp2htqq10dq75/2pic.png?dl=0
I apologize I couldn't pare the code down any further - the truth is I adapted this from something I found online and I'm not terribly familiar with Unity's Line Renderer/capabilities, so I'm not sure where this is going wrong (could it be the ScreenToWorldPoint use?). Thanks in advance to anyone who can help!
Link to code: https://www.codepile.net/pile/5RvyWajn
Your answer
![](https://koobas.hobune.stream/wayback/20220612203153im_/https://answers.unity.com/themes/thub/images/avi.jpg)
Follow this Question
Related Questions
Multiple Cars not working 1 Answer
Distribute terrain in zones 3 Answers
ScreenToWorldPoint and Mouse Position 2 Answers
Flip over an object (smooth transition) 3 Answers
OnCollisionExit or OnTriggerExit with Physics.IgnoreCollision 2 Answers