Unity Tutorial - How to Make a Drag and Shoot Basketball Game

Поділитися
Вставка
  • Опубліковано 25 лис 2024

КОМЕНТАРІ • 42

  • @unitygamedevv
    @unitygamedevv Рік тому +2

    Plz make a tutuorial that how to make basketball hoop physics??

  • @vivekprajapati5694
    @vivekprajapati5694 Рік тому +1

    Thank you so much for this helpful video! Your clear explanations and step-by-step instructions made it easy for me . Keep up the fantastic work!

    • @pixanddev4187
      @pixanddev4187  Рік тому

      Thank you so much my friend, this gives me more motivation to create new interesting quality content.

  • @Homwork-bk3yh
    @Homwork-bk3yh Місяць тому

    Good tutorial for drag and shoot but should have add tutorial how to make the ball touching wall and the hoop ring

  • @abdulkadiraktas5529
    @abdulkadiraktas5529 8 місяців тому

    how to add animation or physics to the net ?
    should we use hige joint 2d for physics /how ?

  • @memolutions1859
    @memolutions1859 Рік тому +1

    Great Maaaaannn !!!tx

  • @FP-ih1lu
    @FP-ih1lu 4 місяці тому

    I don’t get how multiplying by the dragLimit number would do anything limit the distance.

  • @ChampagneBladex
    @ChampagneBladex 9 місяців тому

    does anyone know how to do the same line renderer but in 3d ??? thankyou

  • @arsiilvu
    @arsiilvu 5 місяців тому

    please tell me how to count points in the game. I understood everything and did it, but I would like it to count points.. / written through a translator

    • @pixanddev4187
      @pixanddev4187  5 місяців тому

      Hello my friend!! Thank you so much for watching my video🤗✌️
      for adding points system, you can add a trigger collider inside the hoop, and make it small it should get touched only if ball enters inside, and in its onTriggerenter2d method increment point. i just given you rough idea. you have to create a ScoreCounter script and a hoop script.

  • @Perfect_Dev
    @Perfect_Dev 8 місяців тому

    Thanks you deserve a sub😁

    • @pixanddev4187
      @pixanddev4187  6 місяців тому

      Thank you so much for subscribing, it means a lot to me!

  • @seonoselno1092
    @seonoselno1092 4 місяці тому

    where can i find this source code ?

  • @random_precision_software
    @random_precision_software Рік тому

    Ive subbed ...looking forward to more ccontent ! [ I like the AI Voice ? ? ]

    • @pixanddev4187
      @pixanddev4187  11 місяців тому

      Awesome, thank you!
      yes its an AI voice😄

  • @unkablekraken8309
    @unkablekraken8309 9 місяців тому

    Can you tell me how to do the same thing but only on my phone. I've watched a bunch of videos where it's not the same. Yours is the best and most convenient, but it's on a computer. It makes sense to me, just what can you replace the mouse position in android space, how to read the click on android.
    P.S google translate

    • @pixanddev4187
      @pixanddev4187  9 місяців тому +3

      It will work on mobile as well✌️😊, Enjoy!!🤗
      if you want specific touch the you can use Input.Touch(touchIndex).position instead of Input.Mouseposition
      You can find about it in Unity's Touch.Position documentation.
      Hopefully I Cleared Your Doubt, Thank You!!😊✌️

  • @scratch_Dev721
    @scratch_Dev721 Рік тому +3

    How do you make the hoop?

    • @pixanddev4187
      @pixanddev4187  Рік тому +2

      Hello friend,
      I just created a sprite and then attatched a edge collide to it as a bound in both sides (not in up and down side, because ball will enter from top)

    • @natureplayz7218
      @natureplayz7218 Рік тому

      Pix and dev, im your 100th subscriber!!

    • @pixanddev4187
      @pixanddev4187  Рік тому +1

      @@natureplayz7218 Thank you so much my friend, you completed our 100subs family, I will definitely put my complete efforts to build good quality content for all of you😇😇

  • @InFiNiTy12006
    @InFiNiTy12006 10 місяців тому

    tf i was looking for exact type of game. i went on to search tutorials for angry birds cuz it has same logic 😭 and now i found it.

    • @pixanddev4187
      @pixanddev4187  10 місяців тому

      Thank you for sharing your experience!😊👍
      It's great to hear that my video helped you find the game you were looking for.

  • @SYCOXR-v3f
    @SYCOXR-v3f Рік тому

    thanks dude !!!

  • @pawekozowski6128
    @pawekozowski6128 Рік тому +2

    daaamn!

  • @dishadoshi9154
    @dishadoshi9154 3 місяці тому

    Can you please share the code

    • @rragy1848
      @rragy1848 2 місяці тому

      using System.Collections;
      using System.Collections.Generic;
      using UnityEngine;
      public class DragController : MonoBehaviour
      {
      public LineRenderer lineRenderer;
      public Rigidbody2D rb;
      public float dragLimit = 3f;
      public float forceToAdd = 10f;
      private Camera cam;
      private bool isDragging;
      Vector3 MousePosition
      {
      get
      {
      Vector3 pos = cam.ScreenToWorldPoint(Input.mousePosition);
      pos.z = 0f;
      return pos;
      }
      }
      private void Start()
      {
      cam = Camera.main;
      lineRenderer.positionCount = 2;
      lineRenderer.SetPosition(0, Vector2.zero);
      lineRenderer.SetPosition(1, Vector2.zero);
      lineRenderer.enabled = false;
      }
      private void Update()
      {
      if (Input.GetMouseButtonDown(0) && !isDragging)
      {
      DragStart();
      }
      if (isDragging)
      {
      Drag();
      }
      if (Input.GetMouseButtonUp(0) && isDragging)
      {
      DragEnd();
      }
      }
      void DragStart()
      {
      lineRenderer.enabled = true;
      isDragging = true;
      lineRenderer.SetPosition(0, MousePosition);
      }
      void Drag()
      {
      Vector3 startPos = lineRenderer.GetPosition(0);
      Vector3 currentPos = MousePosition;
      Vector3 distance = currentPos - startPos;
      if (distance.magnitude

  • @unitygamedevv
    @unitygamedevv Рік тому

    i am waiting

    • @pixanddev4187
      @pixanddev4187  11 місяців тому

      Thank you so much for keeping me motivated,
      and also sorry for the delay in videos, its just happening because of my job and other work loads, I'll definitely try to make new video ASAP!!

    • @unitygamedevv
      @unitygamedevv 11 місяців тому

      I just want to learn basketball net physics @@pixanddev4187

  • @ldskategaming2083
    @ldskategaming2083 Рік тому

    i am a beginnar scripting part was littile bit confused

    • @pixanddev4187
      @pixanddev4187  Рік тому +1

      Ohh yes😊, one of my friend also suggested me to make add some beginner videos. and as per you and other my beginner friends feedback, I'll definitely add a unity basic tutorials very soon, and also I'll try to make my videos more easy to understand by all of you, and sorry for the inconvenience my friend. I'll consider your feedback and update my upcoming videos, Thank you so much for watching.😊✌️😇

    • @ldskategaming2083
      @ldskategaming2083 Рік тому

      @@pixanddev4187 bro how can I contact personaly

    • @pixanddev4187
      @pixanddev4187  11 місяців тому

      May be in discord, ✌️😊

  • @Punchmememe
    @Punchmememe 7 місяців тому

    i have challenged my selff with 3 small games to create on the end of this week. I only finished pong and now lets make this with a score and reset. Thanks for using the same header !

    • @pixanddev4187
      @pixanddev4187  6 місяців тому

      Great!! you are trying to learn by challenging yourself is a great motivation, I am glad my videos are getting helpful for you, Thank you my friend for watching🤗🤗

  • @basu_104
    @basu_104 2 місяці тому

    i give up. impossible to understand. zero explanations. no wonder this has so lessviews