- Home /
Convert LineRenderer SetPosition from World to Object Space
I currently have a LineRenderer that renders my line perfectly when I have use world space enabled.
However, I have determined I need to disable use World Space so that when the object moves the line appears in the same place relative to the object.
Is there a convenient way to modify my SetPosition call (which currently uses world space locations) to set the correct locations when world space is disabled? I am assuming I can subtract the object coordinates or something, similar but it seems that the scale of my Line Renderer line is huge when I disable setWorldSpace.
Is there a convenient way of doing this or should I rewrite my SetPosition call from scratch?
Thanks!
Your answer
Follow this Question
Related Questions
Negative scale toggles snapping to integral numbers on children? 1 Answer
OnDrag - Scale for World Space Canvas 0 Answers
Worldspace UI in wrong position/scale after scene change 0 Answers
World Space UI Scale To Fit Screen At DIfferent Aspect Ratios 1 Answer
Can I scale an object at runtime? 1 Answer