Search Unity

Controlling the player spawn position with new input manager

Discussion in 'Editor & General Support' started by NW_Entertainment, May 14, 2020.

  1. NW_Entertainment

    NW_Entertainment

    Joined:
    Oct 18, 2018
    Posts:
    4
    Hello. I am using the new Input System and the input manager is set to join players automatically but I was wondering if I could somehow control where the manager spawns the player prefab. I've tried to set a location in the player start function but this seems to be overridden by the input managers join function. Is there a way that I could edit this?
     
    gomfucius likes this.
  2. dgoyette

    dgoyette

    Joined:
    Jul 1, 2016
    Posts:
    4,195
    Input manager, like for handling key/button presses? You're saying that input system is setting the position of an player in its "join" method? That seems pretty odd to me, unless "input manager" is some 3rd party tool, and not the one from Unity? Could you explain a bit better what the "join" method is, and why you think it's moving the player?
     
  3. NW_Entertainment

    NW_Entertainment

    Joined:
    Oct 18, 2018
    Posts:
    4
    Yes. The new Input system's Player Input manager script. When you set that script's "Join Behaviour" to Join Players When Button Is Pressed, this will automatically spawn another local player to another input device. I would like to control where the player spawns
     
  4. gomfucius

    gomfucius

    Joined:
    Apr 4, 2021
    Posts:
    1
    Were you able to solve this?
     
  5. Serellyn

    Serellyn

    Joined:
    Sep 30, 2011
    Posts:
    104
    I know this is way, way old. But I was struggling with the same thing and just found out that the "spawnpoint" is set to the position of your player prefab. So if you change the transform->position of your prefab, it will change the spawnpoint.