W
W
WeBBeW2020-04-29 17:36:15
C++ / C#
WeBBeW, 2020-04-29 17:36:15

How to make the bot shoot at the player?

I want to make the bot shoot at the player. And such questions appeared.
1) How to check if the player is hidden behind some object?
2) And it will be necessary to use LookAt to turn after the player? If so, how can you remove rotation on X (if you use LookAt)?

(I searched the Internet, but did not find what I need)

Answer the question

In order to leave comments, you need to log in

1 answer(s)
2
2CHEVSKII, 2020-04-29
@WeBBeW

1) How to check if the player is hidden behind some object?

raycast
2) And it will be necessary to use LookAt to turn after the player? If so, how can you remove the Y rotation (if you use LookAt)?

Pay attention to the worldUp parameter.
(I searched the Internet, but did not find what I need)

Bad search.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question