chainsawpenguin
New member
Good afternoon, team! I hope you're all having fun as we head into the New Year!
I'm trying to implement a special script that stands outside of the normal UCC script. In that script, when a certain action occurs, I want the player to turn and look at a specific point. I've coded this as transform.LookAt(myTarget.transform), and I can confirm that I'm reaching that point in my script, and that myTarget is correctly defined, with Debug statements.
However, the player does not actually turn to face the target, presumably because something in the UCC is overriding his rotation.
Does anyone have any ideas? I tried disabling UCC at that point, but the player disappears from the scene entirely if I do that (for some reason). I would like to know how or where to override the player's rotation for a single frame (and then give control back to the controller).
Thanks in advance for any guidance/suggestions/recommendations!!
JW
I'm trying to implement a special script that stands outside of the normal UCC script. In that script, when a certain action occurs, I want the player to turn and look at a specific point. I've coded this as transform.LookAt(myTarget.transform), and I can confirm that I'm reaching that point in my script, and that myTarget is correctly defined, with Debug statements.
However, the player does not actually turn to face the target, presumably because something in the UCC is overriding his rotation.
Does anyone have any ideas? I tried disabling UCC at that point, but the player disappears from the scene entirely if I do that (for some reason). I would like to know how or where to override the player's rotation for a single frame (and then give control back to the controller).
Thanks in advance for any guidance/suggestions/recommendations!!
JW