henke
✅ C# unity rotation clamping.
So I want it to be able to rotate in a 180 degree angle from the left side and 180degree from the right side.. depending on where my mouse is at and which direction i'm facing. Basically limiting the angles the player can have depending on which side hes facing.
The right side (changeDirection.x == 1) works.
The left side (changeDireciton.x == -1) doesn't work.
Any help or code rewrite suggestion appreciated !
5 replies
✅ beginner help with unity
Deal: I am trying to take my health float value from a script that is "not" in the scene (just a script) and pass it the child of a Player Gameobject. I have tried to use GetComponent and some basic stuff but i dont know why its not working. I can use GetComponent from my Player object and get the health float but not from the chiöd script.
Any help or advice appreciated!
26 replies