else
{
Debug.Log("Deployed: True");
if (clonedHusk != null)
{
Debug.Log($"Husk exists. sP P: {spawnPosition.position} sP R: {spawnPosition.rotation}");
Debug.Log($"Husk P: {clonedHusk.transform.position} - Husk R: {clonedHusk.transform.rotation}");
spawnPosition.position = clonedHusk.transform.position;
spawnPosition.rotation = clonedHusk.transform.rotation;
Debug.Log($"Name: {spawnPosition.gameObject.name}");
Debug.Log($"Husk being destroyed. sP P: {spawnPosition.position} sP R: {spawnPosition.rotation}");
Destroy(clonedHusk);
Debug.Log($"Husk destroyed - sP P: {spawnPosition.position} sP R: {spawnPosition.rotation}");
isDeployed = false;
}
}
I have a GameObject Transform spawnposition. This spawnposition is the player, where the husk will be spawned. Whenever I call this function, the rotation is updated, but the position is not. The Debug.Log says that the position has been changed to where the husk was, but it doesn’t update in the game scene. How do I get it to change positions?