Projectile and RayCast2D in Godot 4

Projectile and RayCast2D in Godot 4

16BitDev

1 год назад

11,716 Просмотров

Ссылки и html тэги не поддерживаются


Комментарии:

@Numbers51423
@Numbers51423 - 15.07.2023 03:03

Thanks for more amazing content

Ответить
@moonnight9474
@moonnight9474 - 22.07.2023 13:12

good job

Ответить
@marianmotorina
@marianmotorina - 24.07.2023 11:19

Thanx

Ответить
@puppetindustries1200
@puppetindustries1200 - 08.08.2023 20:53

Why is the raycast moving using player movements instead of targeting player?

Ответить
@3asak1
@3asak1 - 10.08.2023 20:50

Invalid set index 'target_position' (on base: 'RayCast2D') with value of type 'Vector2'.

Ответить
@ShitPostUltimate
@ShitPostUltimate - 18.08.2023 21:45

Thank Man my script od working 💲

Ответить
@LNA881
@LNA881 - 21.08.2023 03:23

Not sure why but my bullets aren't going in the scene

Ответить
@DucNguyen-k4g
@DucNguyen-k4g - 07.09.2023 18:06

How set raycast collision mask 1 and 2 on code

Ответить
@peterungar-u8r
@peterungar-u8r - 13.09.2023 02:09

I keep getting this syntax: Invalid get index 'position' (on base: "null instance"). Do you know what could be happening?

Ответить
@saveriov.p.7725
@saveriov.p.7725 - 04.10.2023 14:11

How do you get the raycast to show up as a red arrow?

Ответить
@vEzly
@vEzly - 08.10.2023 04:53

thank you so much for the video🧡. can you make a video or explain me how I can add a range in which the turret will see the player? sorry I just started to learn gamedev

Ответить
@elkekeeranders2840
@elkekeeranders2840 - 19.10.2023 16:42

how do you make the bullet kill the player?

Ответить
@tPlayerioT
@tPlayerioT - 24.10.2023 04:46

bruh took me 10min to find whatever why the sprite was not looking at player, then i come to this video and find out that i just have to put "ToLocal". Now i ask why is it a thing, it does work now. Thanks

Ответить
@leo358
@leo358 - 06.12.2023 14:36

Any possible reason why I would be getting this error?:
- Invalid set index 'direction' (on base: 'Area2D (EnemyBullet.gd)') with value of type 'Vector2'.

When I edit out this line of code, the combined scene is able to play:
# ENEMY_BULLET.direction = (RAY_CAST.target_position).normalized()

Ответить
@Frazer213
@Frazer213 - 08.12.2023 01:01

In my game im doing a ray cast from the front of an enemy, if the player hits that ray cast the enemy will shoot. The issue I'm having is anything and everything the Raycast collides with comes back as true.

Ответить
@Akamo.
@Akamo. - 04.01.2024 02:45

Cheers man

Ответить
@MrBillathong
@MrBillathong - 21.01.2024 12:27

This code for the bullet desnt work. When I implement it, the bullets are coming out at a 90 degree angle to the right of the ray cast. I followed the code as 1:1 as possible, yet I have no idea what is causing this ( on v4.2.1)

Ответить
@iivan8730
@iivan8730 - 08.02.2024 02:24

everything works except this:
Parse Error: Cannot call non-static function "instantiate()" on the class "PackedScene" directly. Make an instance instead.

it says this right at the end when i try to instantiate the bullet
(btw i am using a character body 2D for the turret)

Ответить
@kentmiggalen9756
@kentmiggalen9756 - 18.03.2024 20:32

helped me <3, thanks

Ответить
@Maanjiro_g
@Maanjiro_g - 08.05.2024 09:36

is there a way to add range for ray? or do we have to create a collision to detect player for making a range?

Ответить
@GGAMER232
@GGAMER232 - 21.07.2024 10:38

When I start my game I get this error:
Invalid get index 'position' (on base: 'null instance').

Ответить
@inyoke1241
@inyoke1241 - 26.07.2024 04:44

Nice work. Stills working in 4.2.2 :)

Ответить
@Kumo0
@Kumo0 - 30.07.2024 22:54

Why isn't working on 3d

Ответить
@eloymoraes4756
@eloymoraes4756 - 11.09.2024 20:42

thanks man from brazil

Ответить
@FixedVenus
@FixedVenus - 08.10.2024 09:23

Its easier thank i thought thanks

Ответить
@sorsx
@sorsx - 15.11.2024 18:41

it worked! thank you so much.

Ответить