B
B
Bogdan Panchenko2019-11-09 17:12:00
C++ / C#
Bogdan Panchenko, 2019-11-09 17:12:00

How to make the player turn behind the cursor like in Top Down Shooter Unity3D 2019?

I am 12 years old (Lol) learning to program on sharps, I climbed a bunch of forums and videos, but I still didn’t understand how to turn the player, let’s say, so that he looked in the direction of the mouse cursor.
3D project - consider!
5dc6c8ed88092102166526.png
Please, help. In Russia, it seems to me that programming is very tight, but I generally keep quiet with Unity & Unreal Engine.
For example, games with a player turn can take Hotline Miami.
(And yes, if you can, please advise some Russian sites and tutorials on C # Unity 2019)

Answer the question

In order to leave comments, you need to log in

1 answer(s)
D
dollar, 2019-11-10
@dollar

Experiment with the ScreenToWorldPoint() function .
There is also ScreenPointToRay() .
Further, having a coordinate in 3D space, one can easily calculate the character's rotation towards this point.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question