Unity Tutorial: Realistic Shooting using Raycasting

preview_player
Показать описание
Today we will learn how to create a shooting for a top down shooter game. We'll do it using raycast. As a part of the tutorial we will create Bullet Trail and Muzzle Flash effect.

#unity #topdown #shooter #shooting

00:00 - Intro
00:15 - What is Raycasting
00:39 - Implementation
01:02 - Bullet Trail Object
02:20 - Vectors Extension
03:25 - Bullet Trail Script
04:23 - Shooting
06:04 - Muzzle Flash
07:40 - End result
Рекомендации по теме
Комментарии
Автор

Hi I dont know if you will se this but I have run into a problem.
In line 47 the <IHittable> is showing me a error in the comand promt.
error CS0246: The type or namespace name 'IHittable' could not be found (are you missing a using directive or an assembly reference?)
I have looked throw your code and mine and never found a spelling mistake.
Is it possible that you could help me?

gigachadmemes
Автор

Hello Fantastic People, I am very sorry it took me so much to create this tutorial! I had it almost ready 2 days ago but I wasn't happy enough with the quality so I decided to redo it from scratch! I hope you enjoy this version :). From next tutorial we are starting the C# Scripting series, can you guess what subjects we will cover first? :)

PitiITNet
Автор

For some reason some of the Instantiated bullet trails just go to the center of the camera and doesn't work

kremmidis_
Автор

I'm confuzzled how did you do the vector thing I don't have an explorer on my visual studio

ArzenikDev
Автор

I have problem with IHittable, i followed other video with IHittable interface, but it doesnt have function Hit this video line 48

SaphireDO
Автор

ahhhh pls help me error CS0246: The type or namespace name 'Hittable' could not be found (are you missing a using directive or an assembly reference?)

tankycatcool
Автор

While writing the bullet trail script i am getting an error "Vector3 does not contain a definition for WithAxis" and I cant find any documentation including WithAxis. Any help would be greatly appreciated.

Ratos-
Автор

My bullet trail not visible in game, why it can happen?

SaphireDO
Автор

my bullet trail thing gets stuck and goes up and down towards the target position.

BoomSki-pnlb
Автор

At 5:38, where does this .Hit() method with no parameters come from? In the line where u check if hittable is not null

niallmoseley
Автор

Hey, how can we go about making this shoot prefabs without trail?

bishopjackson
Автор

how do you make the bullet trail smaller?

tankycatcool
Автор

Assets\Assets\Player\Scripts\Player1.cs(46, 29): error CS1061: 'BulletTrail' does not contain a definition for 'SetTargerPosition' and no accessible extension method 'SetTargerPosition' accepting a first argument of type 'BulletTrail' could be found (are you missing a using directive or an assembly reference?) help me bro plz

Pipisdor
Автор

I have a problem, when I shoot the bullet trail just goes to the middle of the screen!
Help!

bs
Автор

hi, im looking for 2d sprites like u had in this video for weeks, can u tell me the asset name please?

dviross
Автор

make a video tutorial for an enemy character that will shoot the main player through the method RayCast

veymatcompany
Автор

bro, make video on creating shooting ranges in 2D

firstshturm
Автор

Hello, I am new in game development and coding and I have a small problem: my sprite is right oriented and I don’t know how to shoot to right instead up. Maybe I have to change magari a .up in .right in the script but I don’t know where
Great video btw you earn a sub

bower
Автор

All I know now is hot clueless I still am. Jr Programmer path does not prepare you for this at all! Lerp? hitwhat?

LaserGadgets
Автор

hello sir... can you give me link github for Sprite flare and light ?

NUZASARY
join shbcf.ru