E
E
Eduard Vershinin2019-07-17 07:30:11
C++ / C#
Eduard Vershinin, 2019-07-17 07:30:11

How to implement the rotation of the tank bot's weapon on the target?

There is a tank of primitives. He has a gun. When aiming at a player with "LookAt()", the gun looks a little to the side and does not hit. I would be grateful if you tell me how to calculate the Quaternion of rotation on the target, or in a hint why LookAt () does not work as I would like.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
G
Griboks, 2019-07-18
@Griboks

Most likely you have a zero turn at the cannon at all in the place of the muzzle. LookAt does not rotate the muzzle at all, but the object itself.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question