Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more..
    Dismiss Notice
  3. Dismiss Notice

Zombie Toys game: chapter 13s03_01. Mouse problem

Discussion in 'Getting Started' started by SleepyHollow, Jan 6, 2018.

  1. SleepyHollow

    SleepyHollow

    Joined:
    Jan 6, 2018
    Posts:
    2
    Hello guys,

    I started learning Unity few weeks ago, its really fun. I started with Zombie Toy tutorial and i am currently on 13/20 chapter in tutorial. I stuck on the point where you have to connect game manager, player and inputs for player so he can move and turn towards mouse position on the scene. I followed every step of tutorial and the problem is that player game object is not turning towards mouse position.

    So is there anyone who knows what might be problem?

    If it's needed i can provide screenshots and videos what i did in that chapter.

    Thanks in advance!
     
    renn77 likes this.
  2. renn77

    renn77

    Joined:
    Jul 3, 2018
    Posts:
    1
    Having the same problem. I have also added, LookAtMouse & MouseLocation scripts to Boy and still does not turn/follow mouse.
     
  3. Tset_Tsyung

    Tset_Tsyung

    Joined:
    Jan 12, 2016
    Posts:
    406
    Hey guys,

    Is this the Paid-For unity certification courseware that you're talking about? If so I, for one, haven't done it (yet... no cash :( ) and since it's Paid-For courseware (if it is, that is...) Unity may not like posting the code here.

    That being said, I'm sure that they won't mind us helping with the generics of mouse input.

    So allow me to ask the following:
    1. Is this a TPS, FPS, Strategy game? Is the camera directly tied to mouse input, or does it follow the cursor or follow where you click?
    2. What sort of code are you using to turn your objects (be them players, the camera, whatever) - use discretion and perhaps pick and choose which lines to paste here...
    3. Also, is the script still on this 'boy' character during play and is it enabled? Debug.Log lines could help with this.
    Mike
     
  4. matson_adams

    matson_adams

    Joined:
    Jun 17, 2020
    Posts:
    7
    Hi, Did you ever resolve this problem? I am almost positive that it has to do with the LookAtMouse Script.
    I am on this problem now.