Author Topic: Line Marker requests  (Read 424 times)

El Chile

  • Newbie
  • *
  • Posts: 22
    • View Profile
Line Marker requests
« on: February 08, 2019, 12:18:20 PM »
Hi Kronnect,

I've been using your line marker tool quite a bit for my project and I think they're great! I do have a few requests for new features that would be very useful:

First, could we get a reverse drawing animation for the lines (i.e. instead of them moving to the target, they disappear towards the source). Imagine a signal that is suddenly silenced.

Also, could we decouple the line elevation to the viewport's ground elevation? For my project I want to have a flat map, with no terrain features, but still have 3D lines jumping off of the map. In trying it out here, it seems both values are pretty integrated.

Finally, and I know this might be a stretch, could we have the lines selectable with the mouse?

Thanks for listening, cheers!
« Last Edit: February 08, 2019, 12:22:01 PM by El Chile »

Kronnect

  • Administrator
  • Hero Member
  • *****
  • Posts: 4843
    • View Profile
Re: Line Marker requests
« Reply #1 on: February 11, 2019, 03:02:23 AM »
Hi,

1. Yes, added to latest beta. Use "reverseMode" property. Example code:

Code
LineMarkerAnimator lma = map.AddLine (map.GetCountry ("Spain").center, map.GetCountry ("Italy").center, Color.yellow, 0.05f, 0.2f);
lma.reverseMode = true;
lma.drawingDuration = 3f;


2. Try latest beta. The arcElevation parameter should work fine in 2D flat mode as well. It worked but the scale made it almost flat.

This code produces a curved line:
Code
map.AddLine (map.GetCountry ("Spain").center, map.GetCountry ("Italy").center, Color.yellow, 0.1f, 0.2f);


3. To make lines selectable a collider must be added to the line segments. Not an immediate task really. WMSK uses LineRenderer if dashInterval is set to 0 (continuous line) or a custom LineRenderer otherwise. So depending on your case, if you use continuous or dashed lines, you would need to modify the LineMarkerAnimator component to also generate "fake" and invisible objects along the line positions with appropriate colliders.

Regards

El Chile

  • Newbie
  • *
  • Posts: 22
    • View Profile
Re: Line Marker requests
« Reply #2 on: February 12, 2019, 08:12:51 AM »
Awesome! Thank you so much. Let me download the beta and try it out :D