Unity Tutorial - Off-Screen Target-Indicators

Unity Tutorial - Off-Screen Target-Indicators

Omti9

3 года назад

9,318 Просмотров

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


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

Shiferious
Shiferious - 28.06.2023 12:49

Veery nice system and great work! But it doesn't handle dynamic targets - how to handle targets that get destroyed. Will modify by myself and include some event system to handle that.

Ответить
Alireza Asadi
Alireza Asadi - 03.03.2023 16:52

thank you very much this tut helped me a lot. thanks again!

Ответить
Calvin MS
Calvin MS - 12.01.2023 07:31

There is an issue when the Target object is behind the player, the indicator is on the bottom left corner of the screen instead of on the bottom middle. Could you guide me on how to fix this? Thank you for the video

Ответить
Mr Stickboy
Mr Stickboy - 18.12.2022 19:12

Thank you!!!

Ответить
BerryCake
BerryCake - 27.07.2022 17:20

Another cool thing you can do is, instead of returning directly the new position, you can clamp it to a sphere shape. Here's how I'm doing it, but you can do it differently:

Vector3 vec = indicatorPos.normalized;
//Multiply the vector and your desired radius (I'm using the screen height)
vec *= canvasCenter.y - indicatorOffset;
//By default is a perfect circle, so I multiply the X axis to make it adapt to the screen (16/9)
vec.x *= 1.7f;
vec += canvasCenter;

return vec;

Ответить
X360DevNerd
X360DevNerd - 03.10.2021 21:32

Hi, this is excellent, but I am stuck at removing a UI element after i destroy the target, after i destroy a astroid that is marked the circle stays on screen not sure how to grab that out of the array and destroy it as well, would love your help

Ответить
Ido Rozin
Ido Rozin - 28.08.2021 11:19

great video helped me alot!

Ответить
Justin Questroo
Justin Questroo - 07.08.2021 01:34

Is there any way to convert this to use a world space canvas but with the same functionality? The reason is because I want to use something like this for Google Cardboard VR app, but it does not render Screen Space - Overlay canvas.

Ответить
Quintin Wilson
Quintin Wilson - 05.08.2021 08:55

So where do we put the TargetObject script? I feel like I'm missing something because this isn't working for me even though I literally copied everything word for word

Ответить
Mîsal-i Sahâbe
Mîsal-i Sahâbe - 08.07.2021 11:41

Firstly thanks again for this tutorial, I have a issue about target position. UI indicator is moving when camera moved but not smooth, off screen indicator work correctly, but in view camera target UI indicator don't move by smooth when moving camera. I set it in FixedUpdate but there is something what I need?

Ответить
chlasma
chlasma - 02.07.2021 15:19

Hut ab vor deinen skills!!!! funzt leider nicht in VR =(((( ...auch wenn ich das canvas weiter vor setze, bleiben die indikatoren immer auf pos 0;0;0 ...obwohl im skript auf die canvas position referiert wird. Any ideas? danke trotzdem schonmal =)

Ответить
purpl3grape studios
purpl3grape studios - 01.07.2021 19:56

Lemme buy you a beer

Ответить
Mîsal-i Sahâbe
Mîsal-i Sahâbe - 26.04.2021 09:52

Was good tutorial, thanks.

Ответить
abcd
abcd - 25.04.2021 16:38

Really nobody recognises that it is working badly? Yes, it works correctly WHEN the user moved the camera just a bit away from the objects. But if I lock the Y movement of the camera, and only rotate the camera horizontally, then although the target objects are not moving vertically, the indicators will move. So when the object is behind you, it should show vertically it's still on the same position.

Ответить
Benji
Benji - 22.04.2021 14:49

thanks man

Ответить
Ivan Kulibin
Ivan Kulibin - 21.02.2021 11:21

Big thanks, man, it helps me so much!

Ответить
Ваня Гуменюк
Ваня Гуменюк - 18.02.2021 23:36

Great work, dude👌

Ответить
Alex Meesen
Alex Meesen - 16.12.2020 23:59

You are missing the targetscript in your explanation but overall its a great tutorial! Thanks man !

Ответить