- Home /
What is a correct way to move a Drone follow a list of Vector3 points
Hi everyone, I currently have a Drone model as a GameObject The problem is: Given a list of Vector3 points that create a path. The Drone must follow and fly through every point and also have to face toward each point. My solution to this problem is quite general: First, I will rotate the Drone to face toward the point, then adjust the height by flying up or down till it reaches the same attitude of the point. Lastly, when the Drone is facing toward the point and has the same height as it, the Drone starts to move forward until it reaches the destination of the Vector3 location. What function and API should I use to handle each part? I want to complete this with the smallest error. Thanks in advance
Answer by xxmariofer · Jul 17, 2020 at 07:31 AM
the simplest solution is to use the Vector3 class with the methods rotate towards and move towards so you can simply move from the current position to the target position
Your answer
Follow this Question
Related Questions
Object's vectors are not moving with the object, what did i do wrong? 1 Answer
Character Controller Movement - Different speeds on different axis 1 Answer
How do I turn 1 objects rotation into another objects movement direction? 1 Answer
Unity 8-Directional Locked Movement (Super Mario 3D World Style) 3 Answers
How do you make a gameobject rotate slowly to the direction of the mouseclick 0 Answers