Quantcast
Channel: Latest Questions by Ricewind1
Viewing all articles
Browse latest Browse all 16

Line renderer messes up moving?

$
0
0
Hello, I have a gameobject (a turret). At the tip of the barrel of the turret is an empty gameobject called laserSpawn. This laserSpawn contains a line renderer. When I'm trying to move the turret, either through code or in the scene editor, the pivot (or centre) of the turret moves slower than the turret itself. ie. the children outrun the parents. This is because of the 2 positions set in the line renderer (I know this because when I set the size to 0 everything works fine). Now here's the question. Is there a way to stop this from happening? I can't seem to find a way to add positions back to the array again in code. And even if I did. Suppose I have a laser weapon. I pick it up at pos. A, add the 2 positions, and drop it at pos. B. The pivot wouldn't be on position B then would it? TL;DR: How can I prevent children from outrunning their parent because of a line renderer?

Viewing all articles
Browse latest Browse all 16

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>