Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Dismiss Notice

Planet Orbit Lines Need Help

Discussion in 'Scripting' started by MikielSG, Nov 25, 2017.

Thread Status:
Not open for further replies.
  1. MikielSG

    MikielSG

    Joined:
    Dec 26, 2016
    Posts:
    47
    Hello guys.

    I am still looking for a resolution to my issue of drawing planet lines. Below is a video that will show exactly what i am trying to accomplish. Iv looked through loads of tutorials, and the help codex, and i am still failing to understand how to script the draw line. Line render and particle effects not working either (and are costly).



    If anyone can provide a script for the above effect of lines trailing behind the planet, it'd be great.
    I need color, alpha and distance and thickness. i can change the code accordingly if anyone can provide it. thanks
     
  2. GroZZleR

    GroZZleR

    Joined:
    Feb 1, 2015
    Posts:
    3,201
    Trail renderer or a particle system with the trail renderer module.
     
    theANMATOR2b likes this.
  3. MikielSG

    MikielSG

    Joined:
    Dec 26, 2016
    Posts:
    47
    I have already tried these. If you read my post, you'd know that. What is it with people in the unity community with vague answers. cant you guys just tell someone how to do something? Someone is asking for your help, and you reply with "try what you already tried".
     
  4. methos5k

    methos5k

    Joined:
    Aug 3, 2015
    Posts:
    8,712
    I took a quick look at your posting history... You seem very frustrated and quick to blame those that are trying to assist you with your questions. That's not very considerate, on your part, eh.

    Perhaps if you showed what you had done with trail renderers and or particle systems, and asked for assistance, someone would be able to point out a correction/improvement.
     
    theANMATOR2b and MaximumTre like this.
  5. MikielSG

    MikielSG

    Joined:
    Dec 26, 2016
    Posts:
    47
    as i have said
    . Iv looked through loads of tutorials, and the help codex, and i am still failing to understand how to script the draw line. Line render and particle effects not working either
     
  6. MikielSG

    MikielSG

    Joined:
    Dec 26, 2016
    Posts:
    47
    Code (csharp):
    1.  using System.Collections;
    2. using System.Collections.Generic;
    3. using UnityEngine;
    4.  
    5. public class OrbitLine : MonoBehaviour {
    6.  
    7.         private Transform target;
    8.         public int segments;
    9.         public float radius;
    10.         LineRenderer line;
    11.  
    12.         void Start ()
    13.         {
    14.  
    15.         target = transform.parent.GetComponent<F3DPlanet>().OrbitPoint;
    16.             line = gameObject.GetComponent<LineRenderer>();
    17.  
    18.             transform.position = target.position;
    19.             radius = Vector2.Distance(target.position, transform.parent.position);
    20.  
    21.             line.SetVertexCount (segments + 1);
    22.             line.useWorldSpace = false;
    23.             CreatePoints ();
    24.         }
    25.  
    26.  
    27.         //void CreatePoints ()
    28.         void CreatePoints()
    29.         {
    30.  
    31.             float x;
    32.             float y;
    33.             float z = 0f;
    34.  
    35.             float angle = 180f;
    36.  
    37.             for (int i = 0; i < (segments + 1); i++)
    38.             {
    39.                 x = (Mathf.Sin(Mathf.Deg2Rad * angle) * radius);
    40.                 y = (Mathf.Cos(Mathf.Deg2Rad * angle) * radius);
    41.  
    42.                 line.SetPosition(i, new Vector3(x, y, z));
    43.  
    44.                 angle += (-180f / segments);
    45.             }
    46.  
    47.         }
    48.     }
    49.  
     
    Last edited: Nov 26, 2017
  7. methos5k

    methos5k

    Joined:
    Aug 3, 2015
    Posts:
    8,712
  8. MikielSG

    MikielSG

    Joined:
    Dec 26, 2016
    Posts:
    47
    I have been noticing a consistent issue with the community here. It is this on going issue of people answering with vague answers, who refuse to write a few lines of code and a simple paragraph or so explaining how to implement it. I would gather to imagine that people do this because they refuse to work on others projects (by coding for them). I Often wonder, do any of you who have more experience with unity ever stop to think that these small examples provide huge amounts of help, encouragement to the community as a hole, much less just the one person asking?

    Its been a year, i have asked for a resolution to this problem. 30+ videos, Countless discord chats, forum posts, and still no resolution.

    I am lost on how to resolve this disease in this community. If i dident believe it would fall on depth ears, i'd make recommendations to the unity devs to create modules that required little to no coding that would resolve a large amount of basic issues like this.

    I mean seriously, what do i need to do to get a resolution to this problem. I swear to god iv talked to people who all answer almost like iv gotten in this thread.

    And you wonder why people are salty, and upset.

    I would appreciate a resolution to this if anyone out there cares.
     
    Thomas_Molloy likes this.
  9. MikielSG

    MikielSG

    Joined:
    Dec 26, 2016
    Posts:
    47
    This is ultimately what i am shooting for
     
  10. Laperen

    Laperen

    Joined:
    Feb 1, 2016
    Posts:
    1,065
    People simply respond in kind. Treat them like dirt and they are going to treat you back like dirt.

    Simply mentioning you have gone through tutorials does not mean anything to anyone if they don't know what you've gone through, which is why no one knows if you know of trail renderer or particle effects. Incidently, they are the easiest "resolution" to your problem, at least at face value of what you've mentioned of your problem so far.

    Your responses are vague because your question is vague, and you don't reveal more information down the thread. You have stated what you want, but not what it is for or how it is going to be used. Is there any reason why you can't use the trail renderer or particle effects? Maybe you know how to use them, but they don't fit the requirements you need for these orbit lines. We certainly will not know if you don't say anything about it.
     
    kavanavak and landon912 like this.
  11. MikielSG

    MikielSG

    Joined:
    Dec 26, 2016
    Posts:
    47
    Are you really that dense to not see a video above with exactly what i am trying to do, and yet incapable of doing just that?

    Why do you need to know what iv done when an example is right there for you to know exactly what needs to be done? Are you really so stupid to get that?

    Seriously, I dont want your help. You cant even use your head, its highly unlikely that you will have a solution to the above mentioned problem if your intelligence cant even deduce the ability to recognize "an example of what i am trying to do [video]" is what i am looking to accomplish.

    You wanna talk about being dirt, look in the mirror with your vague arrogant attitude. I dont need your pretend pretentious answers. Stick them where my sun (star) dont shine or in some black hole somewhere.

    Better yet, the black hole dont deserve that.
     
  12. methos5k

    methos5k

    Joined:
    Aug 3, 2015
    Posts:
    8,712
    Sorry man, that's just uncalled for.
     
  13. Laperen

    Laperen

    Joined:
    Feb 1, 2016
    Posts:
    1,065
    Because if people replying did not know what you have done, they may post something you already have tried.

    Problems like yours usually have unique quirks that a general solution might not be able to solve for. Such quirks need to be identified by conversation, which you are unwilling to participate in.

    Nobody is psychic, being detailed may not give immediate results, but it is taking a step to engaging people to help you, since they will actually get a feel for the predicament you are in. As I said before, you are receiving vague answers, because your questions are vague to begin with.
     
  14. exiguous

    exiguous

    Joined:
    Nov 21, 2010
    Posts:
    1,749
    Wow so much hostility. Noone here is responsible for your frustration. Getting help is a voluntary gift, not something that can be demanded in rough words. If you don't like the community just join a new one. There are plenty of Unity forums out there.

    When all the people who you have talked to were not able to help you, just consider you are blaming the wrong end.

    I don't agree. Getting a copy and paste solution (what you are seemingly looking for) may resolve the current issue but learns you nothing in solving the next one. Developing does NOT mean putting code fragments from forum and tutorials together. It's more adapting what you find to your needs.

    My issue is other way round. "Newbies" asking in impolite and demanding manner, whining until they get a "perfect" solution, then disappearing silently. This poisoned the forums for me and destroys any desire to help.

    Because it's often easier to "fix" something existing than to create it from scratch. When you don't show your own efforts and tell how it should be improved why should someone else make an effort (which may be wasted to you anyway)?

    These things exist already. They are called 3rd party assets. Just look through the Asset Store. I'm pretty sure you can achieve such effects with Vectrosity for example. But I lack the desire to find out for you how exactly.

    When you can' t get the effect like in the examples why not ask their creators how they did it? Or settle with an effect that you can reproduce for now. I doubt its game breaking when the effect looks different.

    Also your both examples are pretty differrent. When you can't decide how it should look like it's obvious that you won't achieve it. Settle with one goal before aproaching it.

    Anyway. You showed nothing to base the help on (ie own efforts). You showed a lack of knowledge. And you showed a significant lack of manners. Maybe you should reconsider what a forum is for and why people are participating in it. I can just speak for myself but its NOT to feed internet trolls.
     
  15. lordconstant

    lordconstant

    Joined:
    Jul 4, 2013
    Posts:
    389
    Its not our jobs to write code for you. We come on here to help people with problems with their scripts or if there is no script we give them the resources to write one.

    Incidentally you dont need code support. Heres your 'module'

    https://docs.unity3d.com/Manual/class-TrailRenderer.html
     
    Last edited: Nov 26, 2017
    theANMATOR2b and Munchy2007 like this.
  16. GroZZleR

    GroZZleR

    Joined:
    Feb 1, 2015
    Posts:
    3,201
    Anyways, like I said before your complete mental breakdown: trail renderer or particle system with trail renderer module.

     
    renzogened and theANMATOR2b like this.
  17. Eric5h5

    Eric5h5

    Volunteer Moderator Moderator

    Joined:
    Jul 19, 2006
    Posts:
    32,401
    Closed for personal attacks, insults, demanding that everybody else do your work for you, etc. That's not what this forum is for. If you can't post politely, please do not post here at all.

    --Eric
     
    xedo, 4t0m1cw07f, kavanavak and 3 others like this.
Thread Status:
Not open for further replies.