Game Development Reference
In-Depth Information
If this is the correct normal, meaning the value for the dot product is a positive one, we
can rotate the rocket to point to this normal's direction; so the rocket will be at a 90-degree
angle with the line at all times as it rotates. This is easy, because we can convert the nor-
mal vector to an angle with the getAngle() method. All we need to do is apply that
angle to the rocket.
But how fast should the rocket rotate? We'll see how to calculate that next.
Search WWH ::




Custom Search