Cross Product working really weird?
After wanting to make a homing missiles I did some research of my own and found out that Cross Products would work well with homing missiles if you don't want it to automatically point to a target. After some testing I realized I don't know vector math and am confused someone help, I tried to make the missiles slowly aim to the destination but it ended up barely scratching it and going to some other place and if I placed it further it would slow down the rotation speed even though it wasn't even close to being aligned to the destination, here is the code I made so far
01 | local Rocket = game.Workspace.Rocket |
02 | local Destination = game.Workspace.Destination |
06 | local Distance = (Destination.Position - Rocket.Position).Unit |
07 | local Direction = Rocket.CFrame.LookVector |
09 | local NewRotation = Direction:Cross(Distance) |
11 | Rocket.CFrame = Rocket.CFrame + Direction/ 3 |
12 | Rocket.Orientation = NewRotation * 25 |