Search Unity

"The Walking Pet" Physics

Discussion in '2D' started by kurdamir, Jun 5, 2019.

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

    kurdamir

    Joined:
    Jan 12, 2016
    Posts:
    9
    Hi everyone,

    I want to create a 2d game like "The Walking Pet" by Ketchapp
    Google play link: https://play.google.com/store/apps/details?id=com.ketchapp.thewalkingpet
    Gameplay link:


    The player starts the walk by tapping on the screen, if you stop clicking, the player swaying will fall forward or backward.
    Does anyone know any lessons on this type of physics or can help me?
    I will be very grateful.

    Thanks.
     
  2. Antypodish

    Antypodish

    Joined:
    Apr 29, 2014
    Posts:
    10,778
    I doubt you will find particular examples tutorials, for such mechanic. Most likely, you will need cobble something of your own.
     
    Last edited: Jun 5, 2019
    MadeFromPolygons likes this.
  3. kurdamir

    kurdamir

    Joined:
    Jan 12, 2016
    Posts:
    9
    Thank you for reply

    Where? That's the question )))
     
  4. Antypodish

    Antypodish

    Joined:
    Apr 29, 2014
    Posts:
    10,778
    Internet is full of Unity tutorials, examples and source codes. Just simply use search engine. Only make sure, you are using Unity version, same as selected tutorial etc. Otherwise you may run into issues.
     
    MadeFromPolygons likes this.
  5. kurdamir

    kurdamir

    Joined:
    Jan 12, 2016
    Posts:
    9
    Can you show me an example of tutorial?
    I searched but didn't found
     
  6. Antypodish

    Antypodish

    Joined:
    Apr 29, 2014
    Posts:
    10,778
    Where did you searched?
    Internet is full of Unity tutorials, examples and source codes.
    Is worth to improve searching skills. It will help you tremendously in future.
     
    MadeFromPolygons likes this.
  7. kurdamir

    kurdamir

    Joined:
    Jan 12, 2016
    Posts:
    9
    Give me one example, or don't write anymore
     
  8. Antypodish

    Antypodish

    Joined:
    Apr 29, 2014
    Posts:
    10,778
    However harsh it may sounds, you really need to learn, how to search for an information. No one will lead you by a hand, if you don't show your own initiative. Take my advice, or better leave game dev.

    Here are some examples, however.
    https://duckduckgo.com/?q=Unity+tutorials&t=h_&ia=web
     
    dadude123 and MadeFromPolygons like this.
  9. kurdamir

    kurdamir

    Joined:
    Jan 12, 2016
    Posts:
    9
    Facepalm........
     
  10. vakabaka

    vakabaka

    Joined:
    Jul 21, 2014
    Posts:
    1,153
    maybe is it just a gameobject with shifted center of mass ? Then rotate it, if the falling angle is too big ? something.png

    Code (CSharp):
    1. public float rotateSpeed = 250;
    2.     public float speed = 1;
    3.  
    4.     bool isClicked;
    5.     bool isDead;
    6.  
    7.     Rigidbody2D rb;
    8.  
    9.     private void Start()
    10.     {
    11.         rb = GetComponent<Rigidbody2D>();
    12.     }
    13.  
    14.     public void Update()
    15.     {
    16.  
    17.         if (Vector2.Angle (Vector2.up, transform.up) > 20 && !isDead)
    18.         {
    19.             isDead = true;
    20.         }
    21.  
    22.         if (Input.GetKeyDown(KeyCode.Space))
    23.         {
    24.             isClicked = true;
    25.         }
    26.  
    27.      
    28.     }
    29.  
    30.     public void FixedUpdate()
    31.     {
    32.         if (!isDead)
    33.         {
    34.             rb.velocity = new Vector2(speed, rb.velocity.y);
    35.  
    36.             if (isClicked)
    37.             {
    38.                 isClicked = false;
    39.                 rb.AddTorque(rotateSpeed);
    40.             }
    41.         }
    42.     }
     
    kurdamir and MadeFromPolygons like this.
  11. Cornysam

    Cornysam

    Joined:
    Feb 8, 2018
    Posts:
    1,465
    If you expect everyone to do the research for you, you won't learn anything. Master Googling things before posting to this forum (its even in the rules from Unity themselves)
     
  12. kurdamir

    kurdamir

    Joined:
    Jan 12, 2016
    Posts:
    9
    Thank you very much you helped me a lot!!!!!!
     
  13. kurdamir

    kurdamir

    Joined:
    Jan 12, 2016
    Posts:
    9
    I came here because the search did not give me anything, than write any bullshit - write better practical advice .
    Пошел на х....
     
  14. MadeFromPolygons

    MadeFromPolygons

    Joined:
    Oct 5, 2013
    Posts:
    3,982
    Honestly if you are unwilling to simply search the internet, your not going to get much out of game development in general.

    Game development is all about contiously improving and learning, and 99% of the learning you do for yourself. @Antypodish was giving you about as much help as anyone will in regards to searching google. Using google is considered a necessity these days for game development (and lets be honest for most things in life, so best to give it a shot).

    They also asked you where you searched and what you searched for and you didnt bother to respond, so that also made it harder to help you. Help is as good as the context given.

    Another user even drew a image for you and posted you some code, what more do you want? Thats already far more work done for you than should have been done, to be honest.

    EDIT: https://unity.com/learn

    There you go, all the tutorials you need. Dive in, have fun, and come back if you get stuck on something. Good luck.
     
    Antypodish and dadude123 like this.
  15. kurdamir

    kurdamir

    Joined:
    Jan 12, 2016
    Posts:
    9
    Do not litter the topic please
     
  16. MadeFromPolygons

    MadeFromPolygons

    Joined:
    Oct 5, 2013
    Posts:
    3,982
    I posted you a link to the tutorial, clarified that there was not really any context about your searches given, what do you want exactly?

    I am starting to think your just trolling.
     
    Antypodish likes this.
  17. kurdamir

    kurdamir

    Joined:
    Jan 12, 2016
    Posts:
    9
    Read above in the topic
     
  18. MadeFromPolygons

    MadeFromPolygons

    Joined:
    Oct 5, 2013
    Posts:
    3,982
    Okay , your definately a troll.

    I wish you the best of luck but I am not getting baited into this.

    If you actually genuinely wanted to learn, use the link I provided above.
     
  19. Cornysam

    Cornysam

    Joined:
    Feb 8, 2018
    Posts:
    1,465
    You aren't looking things up very well then. Look up how to make objects wobble, how to push an object back and forth, how to balance objects on a point with physics, etc. If you just look up how to make some odd game, your results will be very limited. You need to get creative with your searches.
     
    MadeFromPolygons likes this.
  20. zombiegorilla

    zombiegorilla

    Moderator

    Joined:
    May 8, 2012
    Posts:
    9,052
    If you want help, be polite. Don't make demands. Attitude is everything.

    Closing because toxic.
     
    MadeFromPolygons and Peter77 like this.
Thread Status:
Not open for further replies.