V
V
Vsevolod20182018-07-07 18:13:54
2D
Vsevolod2018, 2018-07-07 18:13:54

How to Rotate sprite to touch point in Unity3d?

I have an empty object that I've thrown a hand-like sprite into with an edge so that it can rotate properly. For 3d, there is lookAt, but how to correctly organize the rotation of the object to the point of contact using IpointerDownHandler?
Help me please!

Answer the question

In order to leave comments, you need to log in

1 answer(s)
D
Denis Gaydak, 2018-07-07
@Vsevolod2018

https://answers.unity.com/questions/585035/lookat-... I'll
google the query for you) hold on. how to turn.
and IpointerDownHandler - I think there is more than enough example in the documentation ..
however, to rotate the object in the direction of pressing - I hope not to click on this object itself)) otherwise it will somehow rotate towards itself ..

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question