Posts by Julia Chaves • 71 points
4 posts
-
0
votes3
answers2105
viewsQ: How do I get an object back to its initial position in Unity?
I have an object that is hit by the raycast and use cObj.transform.position = Vector3.MoveTowards(cObj.transform.position,main.transform.position, step); for the object to go against the camera. How…
unity3dasked Julia Chaves 71 -
2
votes2
answers268
viewsQ: How do I limit the rotation of prefabs on 2 axes in Unity?
I need a Prefab to stop spinning when it reaches 2 positive values in Y. In case it reaches 65º. My code is like this, only it’s not working. private float m_MaxYRotation = 65f; private float…
unity3dasked Julia Chaves 71 -
2
votes2
answers200
viewsA: How to take the camera counter rotation on Unity 5
I got it like this: void Update () { rot = Cardboard.SDK.HeadPose.Orientation; transform.localEulerAngles = (Vector3.down * rot.eulerAngles.y); } Turning around the camera.…
unity3danswered Julia Chaves 71 -
3
votes2
answers200
viewsQ: How to take the camera counter rotation on Unity 5
I wonder how I can move an object in the opposite direction of the camera. Example: When I move the camera to the right in any position (0.30.0), the object moves in the opposite direction (0.-30.0)…
unity3dasked Julia Chaves 71