I want this plane to fly to the blue cube. I want to be able to animate its flight in Unity or in external software. The problem is that I don't know exactly where this cube will be during the game.

enter image description here

What are the best ways to do that? What functionality / assets / plugins to use?

  • \$\begingroup\$ Is the cube an unique gameObject or there can be multiples in the scene? Because if it is a single one, you could just create a public gameObject variable in a script attached to the plane and from there you can use the cube's position to steer the plane's direction. Regarding the flight animation, however, could you explain a bit more what kind of animation are you looking for? \$\endgroup\$
    – FSic
    Jun 19, 2019 at 10:32
  • \$\begingroup\$ Yes there will be only one cube. Let's say that I want the plane to rotate around its roll axis a bit to the sides and also so that its propeller will be rotating. \$\endgroup\$ Jun 19, 2019 at 10:44
  • \$\begingroup\$ I will not post it as an answer as it is just a suggestion and I cannot properly elaborate it now, anyway it seems to me that rather than using an animation, you could actually perform a rotation on its rigidbody around an axis. you might check out here: docs.unity3d.com/ScriptReference/Transform.Rotate.html \$\endgroup\$
    – FSic
    Jun 19, 2019 at 10:54


You must log in to answer this question.

Browse other questions tagged .