Jump to content
This site uses cookies! Learn More

This site uses cookies!

armedunity.com uses cookies to improve user experience.

By continuing to use this site, you agree to allow us to store cookies on your computer.


Premium Member
  • Content Count

  • Joined

  • Last visited

Community Reputation

42 Excellent

About InkyJinx

  • Rank

Profile Information

  • Gender
    Not Telling

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

  1. InkyJinx

    Unity Essentials

    Hey, i was wondering if anyone knew if that everything under the 'Unity Essentials' tab on the asset store can be reused in a sold asset for profit? Thankchuu
  2. Mhmm okay reword this, able to make it move on the Z Axis, when normally looking on the Y axis. Sound better?
  3. Hey guys, im in need of converting this lovely mouselook script to being able to look on the Z-axis, it seems like it should be pretty simple, a bit of swapping around it's just not happening for me, can anyone help me in converting this to Looking on the Z-Axis when normally looking on the Y-Axis? Thankyous! **Solved** public enum RotationAxes { MouseXAndY = 0, MouseX = 1, MouseY = 2, MouseZ = 3 } public RotationAxes axes = RotationAxes.MouseXAndY; public float sensitivityX = 15F; public float sensitivityY = 15F; public float sensitivityZ = 15F; public float minimumX = -360F; public float maximumX = 360F; public float minimumY = -60F; public float maximumY = 60F; public float minimumZ = -60F; public float maximumZ = 60F; float rotationZ = 0F; float rotationX = 0F; float rotationY = 0F; private List<float> rotArrayX = new List<float>(); float rotAverageX = 0F; private List<float> rotArrayY = new List<float>(); float rotAverageY = 0F; public float frameCounter = 20; Quaternion originalRotation; void LateUpdate () { PhotonView pv = this.gameObject.GetComponent<PhotonView> (); if (pv.isMine) { if (axes == RotationAxes.MouseXAndY) { rotAverageY = 0f; rotAverageX = 0f; rotationY += Input.GetAxis("Mouse Y") * sensitivityY; rotationX += Input.GetAxis("Mouse X") * sensitivityX; rotArrayY.Add(rotationY); rotArrayX.Add(rotationX); if (rotArrayY.Count >= frameCounter) { rotArrayY.RemoveAt(0); } if (rotArrayX.Count >= frameCounter) { rotArrayX.RemoveAt(0); } for(int j = 0; j < rotArrayY.Count; j++) { rotAverageY += rotArrayY[j]; } for(int i = 0; i < rotArrayX.Count; i++) { rotAverageX += rotArrayX[i]; } rotAverageY /= rotArrayY.Count; rotAverageX /= rotArrayX.Count; rotAverageY = ClampAngle (rotAverageY, minimumY, maximumY); rotAverageX = ClampAngle (rotAverageX, minimumX, maximumX); Quaternion yQuaternion = Quaternion.AngleAxis (rotAverageY, Vector3.left); Quaternion xQuaternion = Quaternion.AngleAxis (rotAverageX, Vector3.up); transform.localRotation = originalRotation * xQuaternion * yQuaternion; } else if (axes == RotationAxes.MouseX) { rotAverageX = 0f; rotationX += Input.GetAxis("Mouse X") * sensitivityX; rotArrayX.Add(rotationX); if (rotArrayX.Count >= frameCounter) { rotArrayX.RemoveAt(0); } for(int i = 0; i < rotArrayX.Count; i++) { rotAverageX += rotArrayX[i]; } rotAverageX /= rotArrayX.Count; rotAverageX = ClampAngle (rotAverageX, minimumX, maximumX); Quaternion xQuaternion = Quaternion.AngleAxis (rotAverageX, Vector3.up); transform.localRotation = originalRotation * xQuaternion; } else { rotAverageY = 0f; rotationY += Input.GetAxis("Mouse Y") * sensitivityY; rotArrayY.Add(rotationY); if (rotArrayY.Count >= frameCounter) { rotArrayY.RemoveAt(0); } for(int j = 0; j < rotArrayY.Count; j++) { rotAverageY += rotArrayY[j]; } rotAverageY /= rotArrayY.Count; rotAverageY = ClampAngle (rotAverageY, minimumY, maximumY); Quaternion yQuaternion = Quaternion.AngleAxis (rotAverageY, Vector3.left); transform.localRotation = originalRotation * yQuaternion; } } } void Start () { PhotonView pw = this.gameObject.GetComponent<PhotonView> (); if (pw.isMine) { if (GetComponent<Rigidbody>()) GetComponent<Rigidbody>().freezeRotation = true; originalRotation = transform.localRotation; } } public static float ClampAngle (float angle, float min, float max) { angle = angle % 360; if ((angle >= -360F) && (angle <= 360F)) { if (angle < -360F) { angle += 360F; } if (angle > 360F) { angle -= 360F; } } return Mathf.Clamp (angle, min, max); }
  4. So ive got a gameobject, with an int called points in my photon game scene, and im trying to make it be the same for every player..any ideas? also any ideas on how to use += and have it over all builds too? Thanks .. (:
  5. The hud i got off the internet, it was from halo, was just using as an example
  6. Worked! Beautiful, thanks man
  7. I've never used draw texture, ill give it a go, thanks - And its off the net, filled with copyright, but go for it ;P
  8. Hey guys, i was wondering if anyone knew how to make a gui that stretches to each corner if the resolution is changed, im trying to create a helmet hud as seen in the halo sequel, im stuck..if you can help thankyou lots! Example :
  9. Im going to go about this a different way, thanks anyway oma
  10. Everything else seems to work fine, theres about 8 other lines with the only difference the names working...no errors at all, ive never seen anything like this!
  11. script.Gun.fireSoundsilenced = EditorGUILayout.ObjectField(" Silenced: ", script.Gun.fireSoundsilencer, AudioClip, allowSceneObjects) as AudioClip;
  12. Hey guys, i've made a custom editor for an audio clip, but im unable to assign an audioclip to it, does anyone know why this might have occured? It all looks right:
  13. For someone 12 years old it would be better to stick to football/soccer, and other cardio excercises like jogging/bike riding until your body hits its main growth spurt, at that time you should start excersing every muscle in your body, preferably doing a different muscle group every day, and training your core every time you head off to the gym. But yeah as for now just stick to doing alot of cardio, since you can damage your body if you starting lifting heavy weights at a young age.
  • Create New...