Questions tagged [line-renderer]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
2 votes
2 answers
233 views

Animating a line around an image for Unity app

I would like to animate a line around an image, starting from the top right going clockwise around the image and then show the check mark. The animation should be possibel to stop and restart. There ...
Markus's user avatar
  • 153
0 votes
0 answers
540 views

Unity UI Line Rendering (UILineRenderer) pixelated

I'm using UILineRenderer to draw curve of the map. The one thing I'm finding is that the drawing is pixelated despite adding more data points. setting the quality in game view to 4K UHD, and ...
ThePedestrian's user avatar
0 votes
0 answers
1k views

LineRenderer with color fill?

For an interactive I'm making I want to highlight areas of focus using a polygon that has a border and a fill color. I can draw the border with a linerenderer but ...
Jacksonkr's user avatar
  • 229
0 votes
1 answer
2k views

Multiple Lines with Single LineRenderer

I have a database of country, state, and even county level borders and I'm stuck in a situation where I either have 1000+ linerenderers in the scene OR I have a single line that connects every border ...
Jacksonkr's user avatar
  • 229
1 vote
0 answers
28 views

How can I draw a partial circle with LineRenderer?

I'm using the following code, which I found online, to draw a circle with a predefined radius centred on a predefined point in LineRenderer (2D game). ...
chpmerlin's user avatar
0 votes
1 answer
982 views

Collider for Unity Line Renderer

I have several line renderers that are using as gas pipelines. A user can select one end of the pipe and attach it to one connector. Now the problem is some pipes (line renderer) are overlapping and ...
Muhammad Faizan Khan's user avatar
0 votes
1 answer
225 views

Draw LineRenderer gradually, rather than all at once

I'm drawing a line with a LineRenderer. It works, but now I would like it the line to be drawn gradually, instead of appearing all at once. How can I modify my code ...
Kennedy Marino's user avatar
0 votes
0 answers
193 views

Whenever I grapple onto a RigidBody, the grappling/reeling mechanics glitch out in Unity. How can I fix this?

I'm trying to make a game in Unity 2020.1, the feature I'm trying to prototype and test is a grapple gun. The grapple gun should grapple onto walls, and platforms reel the player in. I've implemented ...
Ishaan Masil's user avatar
0 votes
2 answers
3k views

if touching line renderer (do something)

I have this laser script for a ship and I am trying to make it kill an enemy when it is hit with the line rendered laser. How can I achieve this. All things I found online I just could not get to work....
Object's user avatar
  • 289
0 votes
0 answers
210 views

Unity3D) Is there a way not to draw line renderer if vertex pos is zero?

I make a curved line with line renderer. and a sphere move along it. i want to draw a line only behind the sphere. so i do something like this. `` lr.positionCount = 256; ...
Hree's user avatar
  • 115
2 votes
2 answers
14k views

How to render line renderer or trail renderer above UI canvas

I want to create a line renderer and also trail renderer that would follow touches but both must be rendered above my UI canvas — how can I do this? I have tried this with the "screen space camera" ...
Anmol Deep's user avatar
0 votes
1 answer
868 views

How do make a box collider align with a line renderer continuously?

I am having the issue of aligning my BoxCollider2D with my linerenderer. I am trying to have a laser shoot using: ...
Cameron Roberson's user avatar
0 votes
1 answer
1k views

How to get LineRenderer coordinates?

I am trying to get the coordinates or positions that are generated at the time I draw with linerenderer, but it gives me an error. This may be a rookie mistake and I am not using the Linerenderer's ...
Nicolas Flores Muñoz's user avatar
3 votes
1 answer
6k views

Drawing an arrow using the LineRenderer in unity

I'm trying to draw an arrow using a LineRenderer in Unity, using the code suggested here. Based on the UI it all seems good, yet it draws a pin needle, rather than ...
MrHug's user avatar
  • 133
1 vote
0 answers
712 views

Incorrect draw order with LineRenderer

I have a Player game object with a sprite renderer and a line renderer. The sprite for its body and the line for a rope. The problem is that the rope isn't visible (I can see it's drawn in the scene ...
Daniel Marques's user avatar
0 votes
2 answers
182 views

Preventing the final segment in a linerenderer from being stiff?

I am creating a fishing pole, and have the script that draws the line -mostly- worked out using verlet physics. However, the final segment is stiff. The code follows an old Unity3D Subreddit post. ...
Merlin's user avatar
  • 139
3 votes
0 answers
144 views

Line Renderer 2d Follow the edge

I am using mouse position to draw a line using line renderer 2d. What i want is when the line hits a collider it should start to draw on the edge of the collider rather than over the collider. ...
Shahan Butt's user avatar
0 votes
1 answer
405 views

How to make a 2D sprite slowly vanish as it crosses a line — as if disappearing behind a wall?

...Except there is no wall. Only one of its edges. Here is what I mean. Notice how the lines "sink" into the center square. I've been trying to do something very similar, in Unity. My approach is to ...
verified_tinker's user avatar
3 votes
1 answer
780 views

Show Unity Line Renderer as 3d cable or wire

I am dynamically making a line renderer which is pull by the character to show that a character is pulling a wire. The line renderer working fine but unfortunately its display is not according to my ...
Muhammad Faizan Khan's user avatar