Search Unity

Odd issue

Discussion in 'Editor & General Support' started by KRWatkins, Aug 19, 2019.

  1. KRWatkins

    KRWatkins

    Joined:
    Jun 25, 2019
    Posts:
    6
    I have this CharacterController script attached to my Game Object which handles everything great aside from this weird issue. I need to have my Player Game Object selected in the hierarchy otherwise my character just walks 75% slower than normal. Every other function works as normal such as the animations, attack and so on. While it's running if I go into the Hierarchy and simply select my player, regular movement returns. If I start the game with the player selected in the Hierarchy I start with regular movement. If I build the game the movement is fine but it gets annoying while I'm testing it.

    update: I just found that enabling V-sync in the editor fixes it.

    What could be causing this? I can't seem to resolve it in any other way than to have it selected.

    Here is the script if anyone is curious but I've been told it looks fine: https://pastebin.com/WiP2VCx7
     
    Last edited: Aug 19, 2019