Hello, I have just begin to use the asset and look awesome. I'm not sure which is the best way to accomplish what I need, so here is my goal:
I need to have a 2d arrow (image or images but not a line renderer) on the UI Canvas that get the shape of the spline, so that when I change the control points positions of the spline the arrow adapt to the spline aswell. As I am not sure if I explain myself well I made a simple graphic to demonstrate what I want to achieve:
Its that possible? I see with spline controller you can move a sprite across the spline using it as a path, but the sprite remains always the same and this is not what I want.
Thank you in advance
Try using a CurvyLineRenderer with an arrow texture. The new LineRenderer in 5.5 is somewhat usable, though not perfect. Btw, a new Curvy version removing the 5.5 warnings is on the way...
(12-22-2016, 08:11 PM)Jake Wrote: Try using a CurvyLineRenderer with an arrow texture. The new LineRenderer in 5.5 is somewhat usable, though not perfect. Btw, a new Curvy version removing the 5.5 warnings is on the way...
Thank you for the solution. It works as intended with the Curvy Line Renderer script. The problem I have now is that the spline is on the UI Canvas, and it works only on scene mode, on play mode the line renderer doesnt show at all. Any ideas why or how could a solve it?
Either you have a layering issue (UI overlapping the line renderer) or you did not wait for spline initialization (only happens if you feed the line renderer by some script).
(01-15-2017, 09:35 AM)Jake Wrote: Either you have a layering issue (UI overlapping the line renderer) or you did not wait for spline initialization (only happens if you feed the line renderer by some script).
I already hide the rest of the elements of the UI Canvas and I still cant see the spline on the game tab or game mode (it works perfect on scene tab or scene view). I also disabled all access to the spline from code (because from code I just move the control points positions and thats it) but still cant see it. I tried all kind of materials but no luck either. I have read on forums that you cant render a Line Renderer on a UI Canvas with Screen Space - Overlay as a render mode, but I dont know if that info is obsolete or there isnt a way to do it.
Any ideas of how could I solve it?
Thank you again
My knowledge of uGUI, especially when mixing with regular components, is limited. CurvyLineRenderer isn't any different than the regular LineRenderer script beside it fills the points array, that's all I can say - so it's unlikely that the problem is caused by our inherited LineRenderer.
(01-18-2017, 07:36 PM)Jake Wrote: My knowledge of uGUI, especially when mixing with regular components, is limited. CurvyLineRenderer isn't any different than the regular LineRenderer script beside it fills the points array, that's all I can say - so it's unlikely that the problem is caused by our inherited LineRenderer.
Perhaps anyone else got a good idea!?
I tried a different approach. Now I add a new canvas with screen space - camera to the player and now I can see the cury line renderer on the camera. The problem is I cant see always, it dissapears when I look with the player (its an fps) to the front. If I look to the back or to both of sides I can see the curve, but there is a cone in front on the player that cant let me see the curve and no idea why.
(01-18-2017, 07:36 PM)Jake Wrote: My knowledge of uGUI, especially when mixing with regular components, is limited. CurvyLineRenderer isn't any different than the regular LineRenderer script beside it fills the points array, that's all I can say - so it's unlikely that the problem is caused by our inherited LineRenderer.
Perhaps anyone else got a good idea!?
I tried a different approach. Now I add a new canvas with screen space - camera to the player and now I can see the cury line renderer on the camera. The problem is I cant see always, it dissapears when I look with the player (its an fps) to the front. If I look to the back or to both of sides I can see the curve, but there is a cone in front on the player that cant let me see the curve and no idea why.
Any ideas?
After lots of trying different options, I manage to accomplish what I intended. For that I had to attach the curvy spline with the line renderer to the player camera itself, instead to the UI canvas. I thought I finally get my happy ending but I have one last quality issue:
Now on game mode works perfect, but when I make the PC build and run the .exe, the line renderer seems to loose many of the positions from the curvy, only get some keypoints and interpolate rect lines between them. To explain myself better I add captures:
Working as intended in game mode
Not working correctly running .exe
Settings of the curvy + line renderer used (the spline have 3 cp)
I am really happy with the result of game mode, and it probably has to be some build setting but have no idea what it could be. Any know what could be?
Thank you again and sorry for all the messages I had to write.
(01-18-2017, 07:36 PM)Jake Wrote: My knowledge of uGUI, especially when mixing with regular components, is limited. CurvyLineRenderer isn't any different than the regular LineRenderer script beside it fills the points array, that's all I can say - so it's unlikely that the problem is caused by our inherited LineRenderer.
Perhaps anyone else got a good idea!?
I tried a different approach. Now I add a new canvas with screen space - camera to the player and now I can see the cury line renderer on the camera. The problem is I cant see always, it dissapears when I look with the player (its an fps) to the front. If I look to the back or to both of sides I can see the curve, but there is a cone in front on the player that cant let me see the curve and no idea why.
Any ideas?
After lots of trying different options, I manage to accomplish what I intended. For that I had to attach the curvy spline with the line renderer to the player camera itself, instead to the UI canvas. I thought I finally get my happy ending but I have one last quality issue:
Now on game mode works perfect, but when I make the PC build and run the .exe, the line renderer seems to loose many of the positions from the curvy, only get some keypoints and interpolate rect lines between them. To explain myself better I add captures:
Working as intended in game mode
Not working correctly running .exe
Settings of the curvy + line renderer used (the spline have 3 cp)
I am really happy with the result of game mode, and it probably has to be some build setting but have no idea what it could be. Any know what could be?
Thank you again and sorry for all the messages I had to write.
Any ideas on this? Im still a bit lost and I think it has to be something simple
(01-18-2017, 07:36 PM)Jake Wrote: My knowledge of uGUI, especially when mixing with regular components, is limited. CurvyLineRenderer isn't any different than the regular LineRenderer script beside it fills the points array, that's all I can say - so it's unlikely that the problem is caused by our inherited LineRenderer.
Perhaps anyone else got a good idea!?
I tried a different approach. Now I add a new canvas with screen space - camera to the player and now I can see the cury line renderer on the camera. The problem is I cant see always, it dissapears when I look with the player (its an fps) to the front. If I look to the back or to both of sides I can see the curve, but there is a cone in front on the player that cant let me see the curve and no idea why.
Any ideas?
After lots of trying different options, I manage to accomplish what I intended. For that I had to attach the curvy spline with the line renderer to the player camera itself, instead to the UI canvas. I thought I finally get my happy ending but I have one last quality issue:
Now on game mode works perfect, but when I make the PC build and run the .exe, the line renderer seems to loose many of the positions from the curvy, only get some keypoints and interpolate rect lines between them. To explain myself better I add captures:
Working as intended in game mode
Not working correctly running .exe
Settings of the curvy + line renderer used (the spline have 3 cp)
I am really happy with the result of game mode, and it probably has to be some build setting but have no idea what it could be. Any know what could be?
Thank you again and sorry for all the messages I had to write.
Any ideas on this? Im still a bit lost and I think it has to be something simple