I mean, what even is this? Never mind the duplicated code.
All this does is snap the character to the object with this MonoBehaviour component (transform.position = component owner's position) – that is performed instantly (merely 3× more than necessary), and sets character.characterManager.playerCanMove to true even if it was previously false. I hope this function is unused or still in progress of being written…
Also, from the name, I'd expect the signature to be something like ChangeCharacterPositon(Character character, Vector3 position).
View all comments
1
u/_Ralix_ Aug 29 '21
I mean, what even is this? Never mind the duplicated code.
All this does is snap the
characterto the object with this MonoBehaviour component (transform.position= component owner's position) – that is performed instantly (merely 3× more than necessary), and setscharacter.characterManager.playerCanMoveto true even if it was previously false. I hope this function is unused or still in progress of being written…Also, from the name, I'd expect the signature to be something like
ChangeCharacterPositon(Character character, Vector3 position).