Raycast Unity 3d - unity raycast tutorial

Поделиться
HTML-код
  • Опубликовано: 18 дек 2024

Комментарии • 28

  • @DesmodiumGames
    @DesmodiumGames 2 года назад +17

    Wow! This short tutorial really helped me get to grips with ray casting, I’ve used it once or twice but still been unsure on how it should be used. This really clear tutorial was much appreciated!

  • @manychat_learn
    @manychat_learn 2 года назад +6

    Great video!
    just a little reminder that in order to drawRay u have to write :"Debug.DrawRay(raycast.origin,raycast.direction)" not the gameobject transform!

  • @lordpenguen
    @lordpenguen Год назад +2

    Thank you for the video! It was really easy to understand the concept. I was scared of raycasts but now understanding it, it is really easy! ty again homie

  • @briana3186
    @briana3186 2 года назад +3

    Wow! Great video! You explain things very well. I finally get it.

  • @patrik2295
    @patrik2295 Год назад

    Thank you! It helped a lot more, than long tutorials.

  • @sheikh-t1k
    @sheikh-t1k Год назад +1

    Thanks Brother about this information.

  • @kovidkhokar298
    @kovidkhokar298 2 года назад

    up to the point video!
    thanks man finally i understand how raycasts work

  • @UityInit
    @UityInit 2 года назад

    Thank you man i was really confused with this really thank you!

  • @Koljon
    @Koljon 2 года назад +1

    Very cool. thx for the tutorial.

  • @mohamdsami6591
    @mohamdsami6591 Год назад +1

    thanks alot u r awsome

  • @WhyJustWhy-oe9dz
    @WhyJustWhy-oe9dz 2 года назад

    Thanks so much for this! Helps a lot

  • @potato-dq9kv
    @potato-dq9kv 16 часов назад

    This video helped me thrice

  • @ako4435
    @ako4435 2 года назад

    Thanks men it was so clear

  • @MagicxReal-Studio
    @MagicxReal-Studio 2 года назад

    exactly what i needed..😮

  • @adrianmejia8555
    @adrianmejia8555 2 года назад

    How would one go by coding the "monster" to move towards the players position when not directly looked at?

  • @thebaltsology246
    @thebaltsology246 2 года назад +1

    this is really helpful, but can you toggle the ray cast on/off via script? It looks like by just pointing a gun it could do damage.

    • @PixelbugStudio
      @PixelbugStudio  2 года назад +1

      Yea.. you can make the damage script inside a button press function. For example you can make the damage only when we press the mouse button.

  • @mohammaddoustarghasemabad7770
    @mohammaddoustarghasemabad7770 Год назад

    Hello, I have a issue, I have a box in the scene plus a ruler in front of it. I need to send a light ray out of the box and read the value on the ruler after hit. I do not know how to tell the ray light to bring back the value from ruler. Can you help?

  • @gow9476
    @gow9476 2 года назад

    I don't know whats wrong but whenever I look at something with the layer mask set in both the object and the script it still returns nothing

  • @ammarkhn6920
    @ammarkhn6920 Год назад

    "Color.red" or "Color.green" doesn't seem to work in my case.

  • @StickyLabDev
    @StickyLabDev 9 месяцев назад

    i still confused how to make ,,,,,,,,,it alwayse give damage once

  • @erfanzandi1362
    @erfanzandi1362 Год назад

    awesome video...

  • @juliooliveira8159
    @juliooliveira8159 2 года назад

    Why does your Raycast stops after hitting a target? Mine keeps on going forever and this is giving me a lot of problems. Btw your channel helps me a lot,thanks!

    • @MagicxReal-Studio
      @MagicxReal-Studio 2 года назад +2

      combine it with a health script on the enemy and when health reaches 0 , tag enemy object dies and raycast stops shooting cause it wil hit nothing

  • @no_cap2499
    @no_cap2499 2 года назад

    Awesome

  • @r9ymond
    @r9ymond 2 года назад

    thanks

  • @GlitchedBlox
    @GlitchedBlox Год назад

    Hostage

  • @suza_gt
    @suza_gt 4 месяца назад

    TEE