I have duplicated a scene with my player. In the original everything is working fine. When I play the new scene, I cannot seem to move my player. I can't even move it in the Scene View using the Move Tool. The player just seems to jitter in place when I try and move. The only change I have made is created a new tilemap, but there are no colliders in the way of the player. In fact, if I stop, move the player out of the tilemap area, and then press play, I still get the same issue. What could be causing this? Thanks!
Hi there, Could you upload a sample project via bug reporter so we can take a look and investigate this issue? This helps us to debug the issue much faster. ==== You can file a bug report with a sample repro project through = Unity > Help > Report a Bug... Cheers, Darren
Well I just decided to start from scratch. Not sure what happened there but when I duplicated the scene a second time, everything worked fine! Seems like a bug, but I can't seem to replicate it.
Here's a look at the issue I'm experiencing. https://imgur.com/a/21idBtk Here is the code that is instantiating the player switch: Code (CSharp): using System.Collections; using System.Collections.Generic; using UnityEngine; public class CharacterSelector : MonoBehaviour { private bool canSelect; public GameObject message; public PlayerController playerToSpawn; // Start is called before the first frame update void Start() { } // Update is called once per frame void Update() { if (canSelect) { if (Input.GetKeyDown(KeyCode.E)) { Vector3 playerPosition = PlayerController.instance.transform.position; Destroy(PlayerController.instance.gameObject); PlayerController newPlayer = Instantiate(playerToSpawn, playerPosition, playerToSpawn.transform.rotation); PlayerController.instance = newPlayer; gameObject.SetActive(false); CameraController.instance.target = newPlayer.transform; } } } private void OnTriggerEnter2D(Collider2D other) { if(other.tag == "Player") { canSelect = true; message.SetActive(true); } } private void OnTriggerExit2D(Collider2D other) { if (other.tag == "Player") { canSelect = false; message.SetActive(false); } } }