- Home /
How to make a character follow the cursor?
Hi guys, If I have a spaceship for my space game, How can I get the ship bow (front tip), to look at the mouse and have the camera follow where the mouse goes as well. I know this is leaning up on a mouse look, but how do I get the ship to turn as the mouse goes around the screen and whatnot. For example. If I have a cursor, how can I get the camera to follow it so I can look around. But at the same time, have my ship look at it to. I want to make the ship act like ships in the multiplayer game "Star Conflict". Here, look.
The ship is following the cursor and I can press the "up arrow" key to make it follow the mouse. I know this sounds simple to some of you guys but I need your help. Thanks in advance to anyone. If you can, please try to make it C# or JavaScript. Please provide "whole" scripts. Thanks
"Please provide 'whole' scripts," sounds like you are asking someone to write a script for you to your specifications. That is not what this Unity Answers is about. In addition, the question for anyone who has not played Star Conflict is confusing. You have ship rotation, camera rotation, following the cursor, following the mouse, and arrow keys. If you want to work it out yourself, the most common solutions for your problem start with Camera.ScreenToWorldPoint() and Transform.LookAt().
Thank you. Sorry for the inconvenience of the 'Whole' script and the Star Conflict.
Rewrite your question asking a single, clear technical issue that you can build on, and you'll likely get answers.
Your answer
Follow this Question
Related Questions
rotate camera on mouse reaching edges 1 Answer
How do I make the character look at the mouse? 0 Answers
Mouse Follow Controller 2 Answers
How do i make the character look the mouse 0 Answers
Attach an object to the mouse cursor? 0 Answers