|
Post by depalo on Dec 20, 2017 4:22:16 GMT
I’m sure it’s an easy fix, but I haven’t find the resolution yet. When my player enters a trigger that leads/loads the next level, the player ends up appearing off the map I created. The player seems to be loading exactly where the last trigger was instead of the current placement of the map. This results in the player just falling forever because theirs no terrain.
I’m sure there’s a way to have the player load into the area I want him to instead of where he was last. Any help would be appreciated. Thanks!
|
|
|
Post by tharindu on Dec 20, 2017 6:08:46 GMT
In the original scene, check what spawn point name in the next scene the player loads is. If the spawn point is off map it'll spawn the player off map.
|
|
|
Post by depalo on Dec 20, 2017 15:03:50 GMT
In the original scene, check what spawn point name in the next scene the player loads is. If the spawn point is off map it'll spawn the player off map. Thank you for the reply. I have my Invector player placed on the next scene, but the player and his location from the previous scene seems to be the default reset spawn point. Where could I find the check point name to locate where the player loads into, would it be in the Invector player. Thank you for any guidance.
|
|
|
Post by tharindu on Dec 20, 2017 16:22:47 GMT
I am assuming you're going through a portal. In one of the portal's game objects you should have a script called VLoadLevel or something that contains the name of the next scene and the name of the game object that acts as the spawn point in the next scene. Check if the spawn point name in the next scene is right.
|
|
|
Post by uberwiggett on Dec 21, 2017 0:40:54 GMT
Also, just to clarify, that new scene, have you placed a player into it prior to hitting play? Do not do this, as it will cause problems, the player from the previous scene doesn't get destroyed when you load so you will end up with two players in the scene (running on the same controller). There is a specific object that you use to set the spawn position, it's called vGameController, when you create a player in a scene it will automatically place this in the scene. It has two fields, one is "player Prefab" where you can drag your player controller from the project folder into the slot so it knows what it is respawning, and then you can create an empty game object in the scene and call it "spawn point", move that to where you want the player to spawn into your level and drag it from the hierarchy into the "spawnpoint" slot on the vGameController, now when you load level your player will spawn at that point.
Hope this helps, if not I can do a quick video showing you how.
|
|
|
Post by depalo on Dec 21, 2017 21:58:19 GMT
I’ll try this out tonight! Thank you all for the advice. I’ll report back after I play with the scene.
|
|
|
Post by depalo on Jan 2, 2018 0:44:01 GMT
Also, just to clarify, that new scene, have you placed a player into it prior to hitting play? Do not do this, as it will cause problems, the player from the previous scene doesn't get destroyed when you load so you will end up with two players in the scene (running on the same controller). There is a specific object that you use to set the spawn position, it's called vGameController, when you create a player in a scene it will automatically place this in the scene. It has two fields, one is "player Prefab" where you can drag your player controller from the project folder into the slot so it knows what it is respawning, and then you can create an empty game object in the scene and call it "spawn point", move that to where you want the player to spawn into your level and drag it from the hierarchy into the "spawnpoint" slot on the vGameController, now when you load level your player will spawn at that point. Hope this helps, if not I can do a quick video showing you how.
|
|
|
Post by depalo on Jan 2, 2018 0:46:10 GMT
Also, just to clarify, that new scene, have you placed a player into it prior to hitting play? Do not do this, as it will cause problems, the player from the previous scene doesn't get destroyed when you load so you will end up with two players in the scene (running on the same controller). There is a specific object that you use to set the spawn position, it's called vGameController, when you create a player in a scene it will automatically place this in the scene. It has two fields, one is "player Prefab" where you can drag your player controller from the project folder into the slot so it knows what it is respawning, and then you can create an empty game object in the scene and call it "spawn point", move that to where you want the player to spawn into your level and drag it from the hierarchy into the "spawnpoint" slot on the vGameController, now when you load level your player will spawn at that point. Hope this helps, if not I can do a quick video showing you how. Hey everyone! Happy New Year! By the way, I got it to work. The player is loading far from the spawn point that I’ve created, but it’s working. I’ll figure the rest of this issue hopefully. Thank you all so much!
|
|
|
Post by depalo on Jan 7, 2018 2:11:48 GMT
Can anyone help with the step by step process? Do I have to add the VGameController only into the next level? Even after adding a spawn point into the next level my player is still loading off the map when coming to the next level. Any guidance? I know it’s a simple set up, but for some reason I can’t get it right now. Thank you again for any help. - Nick
|
|
|
Post by Invector on Jan 7, 2018 14:46:48 GMT
Take a look into the vMelee_GameOver demo scene, that's the example of what you need on the other scene
|
|
|
Post by depalo on Jan 9, 2018 18:11:09 GMT
Take a look into the vMelee_GameOver demo scene, that's the example of what you need on the other scene Thanks for the information. I’ve added the event manager as well as the game controller into the next stage the player will be appearing in next. I’ve also added a respawn object into the game controller, but my player appears in the level now, but not where I left the spawn point. No matter where I move the spawnpoint, he continues to appear in the same spot when the level loads. Is there a fix for this? Thanks.
|
|