Search Unity

Player spawns on roof of spawn room

Discussion in 'Editor & General Support' started by matteedood, Jan 22, 2021.

  1. matteedood

    matteedood

    Joined:
    Apr 15, 2020
    Posts:
    2
    I don't have a spawn system set up, the player just spawns in wherever the FPSController is placed. I have been making this game for about a month and now it suddenly spawns the player on top of the spawn room instead of inside it. I tried removing the roof to see if the player would fall down but it let's you walk around floating in the air.

    Does anyone have an idea what this might be?

    Let me know if I should provide scripts or screenshots.

    Thank you.
     
  2. Kurt-Dekker

    Kurt-Dekker

    Joined:
    Mar 16, 2013
    Posts:
    38,697
    Did you add an offset to your player prefab?

    Beyond that, since you posted nothing more to comment on, to help gain more insight into your problem, I recommend liberally sprinkling Debug.Log() statements through your code to display information in realtime.

    Doing this should help you answer these types of questions:

    - is this code even running? which parts are running? how often does it run?
    - what are the values of the variables involved? Are they initialized?

    Knowing this information will help you reason about the behavior you are seeing.