Загрузка страницы

Shooting a target behind an obstacle in Unity 3D using Raycast to ensure a clear shot

Shooting a target behind an obstacle. Using a Raycast to ensure a clear shot.

When using a ranged weapon, it's not enough to just approach the target up to the weapon range, but also to ensure that you have a clear shot.

To ensure a clear shot, I use a Raycast from the weapon to the target and continue approaching until a clear shot is possible.

Used colors:
yellow ray - clear shot is possible
blue ray - there is an obstacle
red ray - no obstacle and not target (happens if you try to shoot out of range, not possible with the current logic)

Current game progress playable as WebGl game at:
https://undeadswarm.com

#unitytutorial #gamedev #unity3d

Видео Shooting a target behind an obstacle in Unity 3D using Raycast to ensure a clear shot канала Maty
Показать
Комментарии отсутствуют
Введите заголовок:

Введите адрес ссылки:

Введите адрес видео с YouTube:

Зарегистрируйтесь или войдите с
Информация о видео
2 мая 2022 г. 14:50:13
00:00:34
Яндекс.Метрика