|
I have a plane, and i need a script so a the missiles will always fire to where the mouse pointer is. How would i do this.? The projectiles fire from where the missiles are on the plane, and I want them to fire in the direction the cursor is pointing.
(comments are locked)
|
|
Using Camera.ScreenPointToRay and doing a raycast will get you the point on the plane. All you need to do then is point - firingPosition and you will have the direction in which to fire your missile. Don't have a clue how to implement this... any examples?
May 14 '10 at 06:53 PM
Fishman92
(comments are locked)
|
|
can you give an example because this wil really help me too An example would be nice here too
Jul 08 '10 at 07:16 PM
fireDude67
(comments are locked)
|


You may need to give more detail here about what you need to achieve. Where do the missiles fire from, the camera?
Missiles Fire from under the plane's wings, and i want them to fire to the position of the mouse pointer.
is it an overhead view? a view from the plane's cockpit? you still need to provide more information.
Overhead view, from behind the plane. I'll post a pic.
i'm just saying... that game looks awesome!!