Search Unity

how to 2D Physics Draw With Collider

Discussion in 'Scripting' started by athgen113, Sep 12, 2018.

  1. athgen113

    athgen113

    Joined:
    May 25, 2018
    Posts:
    46
    i want draw like this , how ?
     
  2. athgen113

    athgen113

    Joined:
    May 25, 2018
    Posts:
    46
  3. Doug_B

    Doug_B

    Joined:
    Jun 4, 2017
    Posts:
    1,596
    There is quite a lot going on there. I think you need to pick something simpler for now. :)
     
  4. athgen113

    athgen113

    Joined:
    May 25, 2018
    Posts:
    46
    teach me , or can give me code ,i only need simple drawing with collider and physic gravity
     
  5. Doug_B

    Doug_B

    Joined:
    Jun 4, 2017
    Posts:
    1,596
    If you are serious about giving this a go, then the first thing is the drawing part. Take a look at this tutorial. Give it a try and let's see what happens.

    In all honesty though, this looks to be quite a big project so we'll have to see how things go. . . .
     
  6. athgen113

    athgen113

    Joined:
    May 25, 2018
    Posts:
    46
    ok. how to add collider and physic to that
     
  7. athgen113

    athgen113

    Joined:
    May 25, 2018
    Posts:
    46
  8. GeorgeCH

    GeorgeCH

    Joined:
    Oct 5, 2016
    Posts:
    222
    What, why, how am I even in this thread? o_O
     
  9. Doug_B

    Doug_B

    Joined:
    Jun 4, 2017
    Posts:
    1,596
  10. athgen113

    athgen113

    Joined:
    May 25, 2018
    Posts:
    46
    thank you so much , you are my hero , but i dont understand why use screen into sprite ? and next step how to add collison and physic?
     
  11. athgen113

    athgen113

    Joined:
    May 25, 2018
    Posts:
    46
    do you know ? ,pls help me
     
  12. Doug_B

    Doug_B

    Joined:
    Jun 4, 2017
    Posts:
    1,596
    A sprite is a 2D image on the screen. When you add physics, the sprite will visually represent what the physics is doing.

    Have you grabbed the image and created a sprite object from it? Can you display that sprite on the screen?
     
  13. athgen113

    athgen113

    Joined:
    May 25, 2018
    Posts:
    46
    i dont much understand , i only need
    can help me code ?or send me an project?
     
  14. Doug_B

    Doug_B

    Joined:
    Jun 4, 2017
    Posts:
    1,596
    Sorry athgen113, as I said initially, this is quite a complex project. Also, I actually start a new job tomorrow so I suspect that the amount of time I will have available to help out will reduce significantly.

    Again, I would recommend that you pick something simpler. Either focus on creating a drawing package (allow player to draw circles, lines, shapes and maybe allow them to colour in their shapes), or, try a simple 2D physics based game.

    As you learn more, you can always come back to this project later when you are a little more experienced.
     
  15. athgen113

    athgen113

    Joined:
    May 25, 2018
    Posts:
    46
    sadlly! i dont have time ? i want this project now