Questions in topic: "line"http://answers.unity.com/questions/topics/single/828.html
The latest questions for the topic "line"How to put a gameobject at the position of the line formed by a LineRenderer?http://answers.unity.com/questions/1603986/how-to-put-a-gameobject-at-the-position-of-the-lin.html
![alt text][1]
[1]: /storage/temp/133433-1.png
,lineline rendererWed, 20 Feb 2019 01:22:56 GMTJl_CyborgPost-Processinghttp://answers.unity.com/questions/1597985/post-processing.html
![alt text][1]Hi there,
When i try to use post processing ambient occlusion a dark line comes in the middle of the screen.(I made the line more intense so commenters can see)
If I use high precision it goes away, but the game is for mobile so I would like to spare the fps.
Please help.
Regards,
Ryan
[1]: /storage/temp/132480-screen-shot-2019-02-04-at-123751-pm.pnglinepost processingambient lightMon, 04 Feb 2019 10:35:51 GMTRyanWorkAccDraw Line and detect line collisionhttp://answers.unity.com/questions/1592537/draw-line-and-detect-line-collision.html
I have this code. Its work fine. The line are drawing and detect collision but its too sesitive. When i made a sharp corner or accidentally i little bit draw backwards immediately detect the collision. How can i do that the last 1 unit do not detect.
heres more abot the script: http://www.theappguruz.com/blog/draw-line-mouse-move-detect-line-collision-unity2d-unity3d
using UnityEngine;
using System.Collections;
using System.Collections.Generic;
public class DrawLine : MonoBehaviour
{
private LineRenderer line;
private bool isMousePressed;
public List<Vector3> pointsList;
private Vector3 mousePos;
// Structure for line points
struct myLine
{
public Vector3 StartPoint;
public Vector3 EndPoint;
};
// -----------------------------------
void Awake ()
{
// Create line renderer component and set its property
line = gameObject.AddComponent<LineRenderer> ();
line.material = new Material (Shader.Find ("Particles/Additive"));
line.SetVertexCount (0);
line.SetWidth (0.1f, 0.1f);
line.SetColors (Color.green, Color.green);
line.useWorldSpace = true;
isMousePressed = false;
pointsList = new List<Vector3> ();
// renderer.material.SetTextureOffset(
}
// -----------------------------------
void Update ()
{
// If mouse button down, remove old line and set its color to green
if (Input.GetMouseButtonDown (0)) {
isMousePressed = true;
line.SetVertexCount (0);
pointsList.RemoveRange (0, pointsList.Count);
line.SetColors (Color.green, Color.green);
}
if (Input.GetMouseButtonUp (0)) {
isMousePressed = false;
}
// Drawing line when mouse is moving(presses)
if (isMousePressed) {
mousePos = Camera.main.ScreenToWorldPoint (Input.mousePosition);
mousePos.z = 0;
if (!pointsList.Contains (mousePos)) {
pointsList.Add (mousePos);
line.SetVertexCount (pointsList.Count);
line.SetPosition (pointsList.Count - 1, (Vector3)pointsList [pointsList.Count - 1]);
if (isLineCollide ()) {
isMousePressed = false;
line.SetColors (Color.red, Color.red);
}
}
}
}
// -----------------------------------
// Following method checks is currentLine(line drawn by last two points) collided with line
// -----------------------------------
private bool isLineCollide ()
{
if (pointsList.Count < 2)
return false;
int TotalLines = pointsList.Count - 1;
myLine[] lines = new myLine[TotalLines];
if (TotalLines > 1) {
for (int i=0; i<TotalLines; i++) {
lines [i].StartPoint = (Vector3)pointsList [i];
lines [i].EndPoint = (Vector3)pointsList [i + 1];
}
}
for (int i=0; i<TotalLines-1; i++) {
myLine currentLine;
currentLine.StartPoint = (Vector3)pointsList [pointsList.Count - 2];
currentLine.EndPoint = (Vector3)pointsList [pointsList.Count - 1];
if (isLinesIntersect (lines [i], currentLine))
return true;
}
return false;
}
// -----------------------------------
// Following method checks whether given two points are same or not
// -----------------------------------
private bool checkPoints (Vector3 pointA, Vector3 pointB)
{
return (pointA.x == pointB.x && pointA.y == pointB.y);
}
// -----------------------------------
// Following method checks whether given two line intersect or not
// -----------------------------------
private bool isLinesIntersect (myLine L1, myLine L2)
{
if (checkPoints (L1.StartPoint, L2.StartPoint) ||
checkPoints (L1.StartPoint, L2.EndPoint) ||
checkPoints (L1.EndPoint, L2.StartPoint) ||
checkPoints (L1.EndPoint, L2.EndPoint))
return false;
return((Mathf.Max (L1.StartPoint.x, L1.EndPoint.x) >= Mathf.Min (L2.StartPoint.x, L2.EndPoint.x)) &&
(Mathf.Max (L2.StartPoint.x, L2.EndPoint.x) >= Mathf.Min (L1.StartPoint.x, L1.EndPoint.x)) &&
(Mathf.Max (L1.StartPoint.y, L1.EndPoint.y) >= Mathf.Min (L2.StartPoint.y, L2.EndPoint.y)) &&
(Mathf.Max (L2.StartPoint.y, L2.EndPoint.y) >= Mathf.Min (L1.StartPoint.y, L1.EndPoint.y))
);
}
}linerendererlinedrawMon, 21 Jan 2019 13:53:58 GMTOliversgameHow to remove the "lines" that appear sometimes when previewing the game?http://answers.unity.com/questions/1589592/how-to-remove-the-lines-that-appear-sometimes-when.html
So I'm working on a 2D game and sometimes, when I'm on the game windows and move the player, a black slim line suddently appears and disapears on the screen. Is it normal, or it's some configuration, or will it even keep showing when my game is ready?2d gamegamelineSun, 13 Jan 2019 02:34:09 GMTGcbsA line between two objects with conditionshttp://answers.unity.com/questions/1587408/a-line-between-two-objects-with-conditions.html
I need a character to do a teleport between two points. One transform.position is the players location, the other is mouse input. However, there are a few conditions, one is that the length of the said teleport is set and if mouse input is further, it can't pass a certain point, the other thing is that if there is an object with a certain Tag, for example an unpassable wall, the teleport should only take him to that length. The last condition is that the target should teleport within one or two frames as he clicks the button. I haven't attached any solution attempt of my own because there are so many that I have I tried, I don't know which one is most efficient. It's a 2D game where this calculation will be used in many mechanics, so I'd like to make it an efficient mechanic if possible. This does not have to be a thing solved by drawing an invisible line, just my type of thinking.vector3linerenderervectorvector2lineMon, 07 Jan 2019 01:59:50 GMTImbureWhat's the best way to draw a 2D line WITHOUT using LineRenderer?http://answers.unity.com/questions/1579929/whats-the-best-way-to-draw-a-2d-line-without-using.html
LineRenderer simply does not work right and it's driving me crazy. There are **hundreds** of posts on issues with the line not being visible due to rendering behind **ALL** other game objects, and there are tens of different fixes listed, none of which have any effect for me. Does anyone have suggestions on how to go about drawing lines without using the incredibly broken LineRenderer?2dlinerendererlineline rendererline drawingTue, 11 Dec 2018 15:18:43 GMTKeeganKGBHow can I make character to run only on pre-drawn paths ?http://answers.unity.com/questions/1579117/how-can-i-make-character-to-run-only-on-pre-drawn.html
Hey guys! I want to ask you for help. I want to make my character to run only on pre-drawn lines but I want to also switch among them.
For example you run on the middle line but there is some object that would destroy you so you have to follow transition line to the left line or to the right (it depends which would be connected by transition line).
Could you please help me out ? I found tutorials to make game like subway surfer which is almost what I want but with the difference that the player in my game can't change lines whenever he wants but just when the connections are drawn.
Thank you very much!linerunfollow pathSun, 09 Dec 2018 10:14:53 GMTfilip_gontkoLineRenderer Distortionhttp://answers.unity.com/questions/1573007/linerenderer-distortion.html
Is there a way to fix line render distortion? I want a constant width throughout the line, which is currently set to .5. As I add multiple bends, I think due to the thickness, the line itself distorts as I add additional points. The image attached shows the distortion I'm talking about.
The top shows what is happening with the distortion circled. The bottom shows the desired effect. Ideally I'd like to have all of this within one line renderer, as it's easier to manage the array of line segments than spreading it across multiple line renders.
![alt text][1]
[1]: /storage/temp/127978-distortion.pnggraphicslinerendererlineMon, 19 Nov 2018 03:30:51 GMTdjtorreyHow to calculate the areas of irregular shapes?http://answers.unity.com/questions/1570915/how-to-calculate-the-areas-of-irregular-shapes.html
Hey,
I am pretty new to Unity and game development. I am trying to make a game where a player will draw lines and create some random irregular shapes. How can I calculate these irregular areas when the player draws a line? I am not sure how to approach this problem.
Currently, I am using line renderer to draw lines. So, I know where the lines begin and end. But, I don't know how to calculate the area automatically.
Can someone give me some directions?
![Sample Image][1]
[1]: /storage/temp/127588-pixil-frame-0-1.pnglineareacalculationSun, 11 Nov 2018 18:33:01 GMTmhmtnlrParticle system and line renderer doesn't work in Maximized Windowhttp://answers.unity.com/questions/1561828/particle-system-and-line-renderer-doesnt-work-in-m.html
Hi,
As title says, when I check the "Maximize On Play" button and start the game, my particles and lines dont show.
![alt text][1]
If I don't have the "Maximize On Play" button checked, and have my Game Window open to the side of Scene Window, both of the above work.
![alt text][2]
Does anyone have a clue what's going on?
[1]: /storage/temp/125972-pobrane-1.png
[2]: /storage/temp/125973-pobrane.pnggamespritesrendererwindowlineThu, 11 Oct 2018 17:47:23 GMTMagalekissue with LineRender start from 0http://answers.unity.com/questions/1558177/issue-with-linerender-start-from-0.html
hello.
i'm trying to learn the bazier curve, by follow a tutoria, I do exactly the same things that I saw on the tutorial but I can't figure out why my curve is starting from 0.0
here is my code and my screen of unity.
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class Bezier : MonoBehaviour
{
[SerializeField]
private LineRenderer lineRenderer;
[SerializeField]
private Transform point0,point1,point2;
private Vector3[] positions = new Vector3[50];
private int numOfPoints = 50;
// Use this for initialization
void Start ()
{
lineRenderer.positionCount = numOfPoints;
}
// Update is called once per frame
void Update ()
{
//DrawLinearCurve();
DrawQuadraticBazierCurve();
}
private void DrawQuadraticBazierCurve()
{
for (int i = 1; i < numOfPoints; i++)
{
float t = i / (float) numOfPoints;
positions[ i - 1] = CalculateQuadraticBezierPoint(t,point0.position,point1.position,point2.position);
}
lineRenderer.SetPositions(positions);
}
/*private Vector3 CalculateLinearBezierPoint (float t, Vector3 p0, Vector3 p1)
{
return p0 + t * (p1 - p0);
// P = P0 + t ( P1 - P0 )
}*/
private Vector3 CalculateQuadraticBezierPoint (float t, Vector3 p0, Vector3 p1, Vector3 p2)
{
float u = 1 - t;
float tt = t * t;
float uu = u * u;
Vector3 p = uu * p0;
p += 2 * u * t * p1;
p += tt * p2;
return p;
// B(t) = (1-t)2P0 + 2(1-t)tP1 + t2P2
}
someone can help me to figure out what i'm doing wrong?alt text![alt text][1]
[1]: /storage/temp/125393-screen2.pnglinerendererlinecurveline rendererline drawingSun, 30 Sep 2018 15:07:16 GMTSylon87How To draw line or elastic line around circuleshttp://answers.unity.com/questions/1555364/how-to-draw-line-or-elastic-line-around-circules.html
Hi All
![alt text][1]
can any one help me or give me the best idea or asset to to make an elastic line or simple line around external circules surface.
inf : Circules can be sphere or cylinder and we can move them by dragging.
the moste important things is how to keep line on the edges of circules when on dragging.
every thing explained on the image .
[1]: /storage/temp/124939-sans-titre-1.jpglinerotatearoundcircularelasticFri, 21 Sep 2018 07:55:02 GMTsisocanofifishing line with line render?http://answers.unity.com/questions/1553495/fifishing-line-with-line-render.html
hello everyone.
i'm working on a simple fishing game now, and i have a problem to create a fishing line attached to the rod, it's a good approach to use a line render?linerendererlineropeSat, 15 Sep 2018 13:52:09 GMTSylon87Error log with line number but without column number. How to solve it?http://answers.unity.com/questions/1543452/error-log-with-line-number-but-not-without-column.html
Whats happens:
...Scripts/Editor/Enemy2DAIEditor.cs:488)
What i need:
...Scripts/Editor/Enemy2DAIEditor.cs:488,35)
Thank you.errorbuglineconsolelogFri, 17 Aug 2018 18:44:51 GMTleohotluzDraw Line Like word gameshttp://answers.unity.com/questions/1536624/draw-line-like-word-games.html
Hi
how can I draw a line with the touch like word game?<br>
This line in most of the word games is the same as you see in the image.<br>
Is there any source code for that?<br>
Thanks
<br><br>
![alt text][1]
[1]: /storage/temp/121894-wco.pnglinewordTue, 31 Jul 2018 17:12:40 GMTHamedDaneshniaLine Renderer not showing in build modehttp://answers.unity.com/questions/1531253/line-renderer-not-showing-in-build-mode.html
I make line with this script
void Update()
{
if (Input.GetMouseButtonDown(0))
{
if (line == null)
{
CreateLine();
}
//get the mouse position
mousePos = Camera.main.ScreenToWorldPoint(Input.mousePosition);
mousePos.z = -25;
//set the start point and end point of the line renderer
line.SetPosition(0, mousePos);
line.SetPosition(1, mousePos);
}
//if line renderer exists and left mouse button is click exited (up)
else if (Input.GetMouseButtonUp(0) && line)
{
mousePos = Camera.main.ScreenToWorldPoint(Input.mousePosition);
mousePos.z = -25;
//set the end point of the line renderer to current mouse position
line.SetPosition(1, mousePos);
//set line as null once the line is created
line = null;
currLines++;
}
//if mouse button is held clicked and line exists
else if (Input.GetMouseButton(0) && line)
{
mousePos = Camera.main.ScreenToWorldPoint(Input.mousePosition);
mousePos.z = -25;
//set the end position as current position but dont set line as null as the mouse click is not exited
line.SetPosition(1, mousePos);
}
}
private void CreateLine()
{
line = new GameObject("Line" + currLines).AddComponent<LineRenderer>();
//set the number of points to the line
line.positionCount = 2 ;
line.startWidth = 0.10f;
line.endWidth = 0.10f;
//render line to the world origin and not to the object's position
line.useWorldSpace = false;
line.startColor = Color.cyan;
line.transform.parent = gameLine.transform;
}
In editor lines works normally and they are shown on screen, but when i made a build the lines are not shown and i don't understend why.
Someone can help me?editorbuildlinerendererlineThu, 19 Jul 2018 09:43:32 GMTFullVisionDaltonDraw out Line in C#http://answers.unity.com/questions/1530027/draw-out-line-in-c.html
I have a grappling hook and that when you press the button, a line is made connecting you to your target. The problem is that it appears immediately and doesn't draw out towards the target. I was using this video as a reference on how to do it. https://www.youtube.com/watch?v=Bqcu94VuVOI
private float dist;
public LineRenderer line;
private Transform destination;
public float lineDrawSpeed = 6f;
private float counter;
void Update()
{
var device = SteamVR_Controller.Input((int)controller.index);
if (device.GetTouchDown(SteamVR_Controller.ButtonMask.Trigger) && energy == true)
{
RaycastHit hit;
if (Physics.Raycast(controller.transform.position, controller.transform.forward, out hit, raycastDistance))
{
counter += .1f / lineDrawSpeed;
dist = Vector3.Distance(Object.transform.position, hit.transform.position);
float x = Mathf.Lerp(0, dist, counter);
Vector3 pointA = Object.transform.position;
Vector3 pointB = hit.transform.position;
Vector3 pointAlongLine = x * Vector3.Normalize(pointB = pointA) + pointA;
line.enabled = true;
line.SetPosition(0, Object.transform.position);
target = hit.point;
pointAlongLine = target;
line.SetPosition(1, target);
hitwall = true;
line.material.mainTextureOffset = Vector2.zero;
}
}
else if (device.GetTouch(SteamVR_Controller.ButtonMask.Trigger) && line.enabled)
{
line.SetPosition(0, Object.transform.position);
line.material.mainTextureOffset = new Vector2(line.material.mainTextureOffset.x + Random.Range(-.01f, 0.05f), 0f);
pressed = true;
hitwall = true;
}
else
{
line.enabled = false;
hitwall = false;
}linerendererlineline rendererMon, 16 Jul 2018 20:37:04 GMTKek_KekLegacy GUI draw line issueshttp://answers.unity.com/questions/1529950/legacy-gui-draw-line-issues.html
I've made a world to screen line drawing script based on:
http://wiki.unity3d.com/index.php?title=DrawLine
I'm using the legacy UI, because it doesnt require a canvas and is easier to create at runtime, i also mostly use these UI features for debugging.
Here is what i have so far:
public static Texture2D lineTex;
public static void DrawLine(Rect rect) { DrawLine(rect, GUI.contentColor, 1.0f); }
public static void DrawLine(Rect rect, Color color) { DrawLine(rect, color, 1.0f); }
public static void DrawLine(Rect rect, float width) { DrawLine(rect, GUI.contentColor, width); }
public static void DrawLine(Rect rect, Color color, float width) { DrawLine(new Vector3(rect.x, rect.y,0), new Vector3(rect.x + rect.width, rect.y + rect.height, 0), color, width); }
public static void DrawLine(Vector3 pointA, Vector3 pointB) { DrawLine(pointA, pointB, GUI.contentColor, 1.0f); }
public static void DrawLine(Vector3 pointA, Vector3 pointB, Color color) { DrawLine(pointA, pointB, color, 1.0f); }
public static void DrawLine(Vector3 pointA, Vector3 pointB, float width) { DrawLine(pointA, pointB, GUI.contentColor, width); }
public static void DrawLine(Vector3 pointA, Vector3 pointB, Color color, float width)
{
Vector3 pointAOnScreen = Camera.main.WorldToScreenPoint(pointA);
pointAOnScreen.y = Screen.height - pointAOnScreen.y;
Vector3 pointBOnScreen = Camera.main.WorldToScreenPoint(pointB);
pointBOnScreen.y = Screen.height - pointBOnScreen.y;
Matrix4x4 matrix = GUI.matrix;
if (!lineTex) { lineTex = new Texture2D(1, 1); }
Color savedColor = GUI.color;
GUI.color = color;
float angle = Vector3.Angle(pointBOnScreen - pointAOnScreen, Vector3.right);
if (pointAOnScreen.y > pointBOnScreen.y) { angle = -angle; }
GUIUtility.ScaleAroundPivot(new Vector3((pointBOnScreen - pointAOnScreen).magnitude, width), new Vector3(pointAOnScreen.x, pointAOnScreen.y + 0.5f));
GUIUtility.RotateAroundPivot(angle, pointAOnScreen);
GUI.DrawTexture(new Rect(pointAOnScreen.x, pointAOnScreen.y, 1, 1), lineTex);
GUI.matrix = matrix;
GUI.color = savedColor;
}
However, when i try drawing a line between two points, it works just fine until the camera moves.
The line starts to jitter.
![alt text][1]
The lines also appear behind the camera.
I wouldnt mind culling them if they are out of vision also.
[1]: https://uc01ce087c546201536e794e7c30.dl.dropboxusercontent.com/cd/0/get/ALg8UPK1A7FbCWRQg7t4127pTas4tY63baGb6d51Tfo3TYG768dyGJFCwlGuYGTLW4Bqi17GFLYjAPORwocES2j7iXilbb69M-rak5dkgh_xDYn9c2nOykNeYCRbWnmCUdzBd8duSPWMY1gKbRMvMan76dvUM5eGkQutDkSB7pgeXHuUlubTXvRMqdJqgos7NaA/fileguirenderinglineMon, 16 Jul 2018 16:53:15 GMTJ-FDraw line with TrailRendererhttp://answers.unity.com/questions/1519875/draw-line-with-trailrenderer.html
How to make a line with Trail Renderer so that the whole line has a collider?unity 2dlinetrailrendererdrawlinetrail rendererTue, 19 Jun 2018 18:57:29 GMTOBessMove to linehttp://answers.unity.com/questions/1519871/move-to-line.html
I'm doing a LineRenderer, and I have a cube. How to make this cube go to the points of the line?
The first of line - the second of cube.
//first
public class DrawLine : MonoBehaviour {
public LineRenderer lineRenderer;
public EdgeCollider2D edgeCol;
List<Vector2> points;
float k;
public void UpdateLine (Vector2 mousePos) {
if (points == null) {
points = new List<Vector2> ();
SetPoint (mousePos);
return;
}
if (Vector2.Distance (points.Last (), mousePos) > .1f)
SetPoint (mousePos);
}
void SetPoint(Vector2 point){
points.Add (point);
lineRenderer.numPositions = points.Count;
lineRenderer.SetPosition (points.Count - 1, point);
if (points.Count > 1)
edgeCol.points = points.ToArray();
}
void OnCollisionEnter2D (Collision2D col) {
if(col.gameObject.tag == "Player"){
Debug.Log ("LOL");
}
}
}
//second
public class MoveCube : MonoBehaviour {
int s;
float k;
public GameObject gm;
void Start(){
PlayerPrefs.SetInt ("Move", 0);
}
void Update(){
if (PlayerPrefs.GetInt ("Move") == 1) {
transform.Translate (Time.deltaTime * GetComponent<Rigidbody2D> ().mass, 0f, 0f);
k += 1 * Time.deltaTime;
if (k > 1) {
s++;
k = 0;
}
GameObject.FindGameObjectWithTag ("Score").GetComponent<Text> ().text = s.ToString ();
} else if (PlayerPrefs.GetInt ("Move") == 2) {
transform.Translate (Time.deltaTime * GetComponent<Rigidbody2D> ().mass, 0f, 0f);
k += 1 * Time.deltaTime;
if (k > 1) {
s++;
k = 0;
}
GameObject.FindGameObjectWithTag ("Score").GetComponent<Text> ().text = s.ToString ();
}
}
void OnCollisionEnter2D (Collision2D col) {
if(col.gameObject.tag == "Platform"){
PlayerPrefs.SetInt ("Move", 1);
PlayerPrefs.SetInt ("Spawn", 1);
}
if(col.gameObject.tag == "Line"){
PlayerPrefs.SetInt ("Move", 2);
PlayerPrefs.SetInt ("Spawn", 1);
}
}
}unity 2dmovelinerendererlinemove toTue, 19 Jun 2018 18:53:54 GMTOBessLine Renderer in World Spacehttp://answers.unity.com/questions/1519188/line-renderer-in-world-space.html
Hi
I have a line renderer in world space, but funnily enough it's only visible in the camera when its in a certain position (pretty much only when the camera is right in front of the line).
The line renderer is in a game object on a canvas. I'm developing for VR (and the line renderer is acting like some sort of a line graph right now)
I'm wondering why this happens, and how it can be fixed?
Edit:
I have multiple elements on the canvas.
This is the canvas inspector:
![alt text][1]
And this is the line renderer in inspector
![alt text][2]
[1]: /storage/temp/119116-canvas.jpg
[2]: /storage/temp/119117-line.jpg
I use a script to change the values in line renderer for its position in world space, material and color. I've tried moving it infront of my canvas.. and that helps a bit but in VR, it looks really awkward since its obviously infront of the canvas and not on it.cameralinerendererlineworldspacelinesMon, 18 Jun 2018 06:25:11 GMTcleu7001Extremely Buggy rigidbody collisions [URGENT, DEADLINE 3 DAYS AGO!!!!!!! C#] Please answer. I can't figure it out! (As of 1 Answer)http://answers.unity.com/questions/1513395/extremely-buggy-rigidbody-collisions-urgent-deadli.html
Please please please please please please help me with this!
My rigidbody collisions are seriously acting up, and I can't figure out why. More info, code, pics, and even a video are here:
**EDIT: I fixed the bouncing. I added the material to both the object AND the wall. But the stepping issue is still happening. Please help!**
https://drive.google.com/drive/folders/1BQp_4qqa0_P96joKgimMuwB9Pij_j_yd?usp=sharingcollisionrigidbodynot workinglinedeadFri, 01 Jun 2018 23:44:28 GMTSoshJamAbsolutely insane rigidbody collisions [URGENT] (C#)http://answers.unity.com/questions/1511674/buggy-rigidbody-collisions-urgent-c-1.html
My rigidbody collisions are acting up, and I can't figure out why. More info, code, pics, and even a video are here:
https://drive.google.com/drive/folders/1BQp_4qqa0_P96joKgimMuwB9Pij_j_yd?usp=sharingcollisionnot workinglinedeadwhyMon, 28 May 2018 18:20:17 GMTSoshJamSplitting the screen into 2 sides with a linehttp://answers.unity.com/questions/1508854/splitting-the-screen-into-2-sides-with-a-line.html
Hello. I want to make a scene in Unity where you have circles (sprites) on screen and what should happen is that there a line needs to be spawned and it will tell you how many circles are on one side and how many on the other.
How can I do this? should the line be made with linerenderer or with a png sprite or what?
And also how do I differ the sides?
I really need this, it's very important for me.
Thank you very very much for helping! :)lineMon, 21 May 2018 09:57:36 GMTsipSupsHow to make a line genereted with LineRenderer to not be affected by scene lightshttp://answers.unity.com/questions/1492447/how-to-make-a-line-genereted-with-linerenderer-to.html
The title says everything. I have some LineRenderers that generete lines.
I use this lines in the world map, but i dont want to be affected by the "Sun/Moon" light cycle.
How can i do it?
Thaanks!lightlineWed, 11 Apr 2018 15:20:26 GMTtormentoarmagedoomHow can I break an UIText on OnClick of an button without scripts ?http://answers.unity.com/questions/1483911/how-can-i-break-an-uitext-on-onclick-of-an-button.html
Hi,
I'm looking here on the answers and on the google, but on my searches I can't reach nothing.
I'm trying to replace an UIText content on button event OnClick.
It work, but, without break lines.
It's possible ?
To explain:
I have an simple scene, with 2 buttons and 1 text.
each button change the text, and I can't have more than one UIText, I need to put all in the same UIText.
My UIText was created like this:
![alt text][1]
But, on the text I have an big area to write and here I can hit ENTER.
![alt text][2]
Then, I put the event OnClick to change the text, bu here I have only one line to write...
![alt text][3]
And, when I hit the button, my text change to:
![alt text][4]
How can I do the break line here ?
Or it's impossible and I need to really use script ?
My unity version is:
![alt text][5]
Very thanks for your time and your help.
[1]: /storage/temp/113516-01.png
[2]: /storage/temp/113517-02.png
[3]: http://image.ibb.co/mTt9Hx/03.png
[4]: http://image.ibb.co/hm23cx/04.png
[5]: http://image.ibb.co/fHQdSx/05.pngbuttontextcanvaslinebreakThu, 22 Mar 2018 17:42:42 GMTDavid_Farina_BRHow to detect a mouse click on a line in 3d?http://answers.unity.com/questions/1476678/how-to-detect-a-mouse-click-on-a-line-in-3d.html
![alt text][1]
[1]: /storage/temp/112413-screen-shot-2018-03-05-at-50750-pm-copy-copy.jpg
I have a Solar system with planets's orbits drawn by Line Renderer. I want to check if my mouse click is on a line or not?
Thanks,objectlinerendereronmousedownlineline drawingMon, 05 Mar 2018 10:25:22 GMTtubaphcThe location of the object by pointshttp://answers.unity.com/questions/1473570/the-location-of-the-object-by-points.html
Hello everybody!
Tell me please. I have 2 points in space, I need to rotate the tunnel model so that its ends fall into these points. I put the tunnel in the center between the point and specify the length, this does not raise any problems. It is not possible to turn the model.
It turns out that in the figure. It is necessary that the models are connected to each other.
![alt text][1]
[1]: https://forum.unity.com/attachments/upload_2018-2-26_15-0-8-png.268074/
P.S. The white line is needed to tell how the models should be locatedc#unity 5programminglineproMon, 26 Feb 2018 08:11:02 GMTKonkypenT42LineRenderer Lines Have Inconsistent Widthshttp://answers.unity.com/questions/1469380/linerenderer-lines-have-inconsistent-widths.html
I'm trying to draw thin lines using LineRenderer and have run into a problem where identical lines are being rendered at variable widths with random lines picking up an extra row or two of fuzzy pixels, depending on the screen resolution or "scale" level in the editor. Is there anything I can do to consistently get identically sized lines?
----------
Here's an example of what this effect looks like:
![Screenshot][1]
[1]: /storage/temp/111403-unitylines.png
---
Clarification: this is using an orthographic camera and the LineRenderers have every shadow and lighting option disabled, "View" Alignment, and are all positioned on the same plane.linerendererlineline drawingFri, 16 Feb 2018 10:41:35 GMTS1owbroWhite/Yellow line under Third Person Character?http://answers.unity.com/questions/1463887/whiteyellow-line-under-third-person-character.html
![alt text][1]
[1]: /storage/temp/110651-unity-answers.png
There is a tiny vertical line beneath my Third Person Controller, and for the life of me I can't figure out how to remove it. I've tried turning off all of my gizmos and hiding every item one after the other, even hiding the camera and replacing it with a backup. the only info I've been able to find is that when I turn off the Third Person User Control script, it goes away, but then I can't control the character. Any solutions?cameracontrollercontrolcontrolslineSat, 03 Feb 2018 23:20:11 GMTTheAweSAMOne