Quantcast
Viewing all articles
Browse latest Browse all 16

How to Extend/Extrude a Mesh

I couldn't think of the best way to word the title, so I apologise if it's misleading. Basically I want to make a grapple, more specifically the extendible bit that stretches to the faraway object it attaches to. At the moment I'm using a line renderer and a simple unlit texture, but it looks terrible. I pondered using a cylinder model and simply scaling in height, but that would stretch the texture. Is there either a better way to achieve what I want, or a way to dynamically tile the texture at the same rate that it's stretching? At the moment this is the code I am using each update to stretch the line renderer: // lerp from player towards target with grapple float t = Mathf.InverseLerp(m_StartTime, m_EndTime, Time.time); m_End = Vector3.Lerp(m_Start, m_Target, t); m_Line.SetPosition(1, m_End); Any help is appreciated.

Viewing all articles
Browse latest Browse all 16

Trending Articles



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