It would help to say what game and engine this is for. And you copy-pasted stuff you probably didn't want to.