Skullobich: The god of Anal sex, hands down... Mr. Comissair, for if you ever do Dota stuff... rule34.paheal.net/post/view/1665449 only you can make it happen!
comissair: @Anonymous: you can press the 1 2 or 3 keys to change her costume
@Anonymous: there is a freeCamera script in the scripts folder, just drag and drop it in the Camera GameObject and deactivate/remove the MouseOrbit script
Anonymous20(1): Trying to figure out how to lower the timescale on the project, but nothing on google seems to work and I don't know C##. Anyone got something?
great work like usual , thanks comissair
- Reply
i seriously fucking love you and i'm not even gay.
i'd love to see one with cammy's SF V model as well
- Reply
@Anonymous: its "comissair" with one letter "m"
Thanks all.
- Reply
- Reply
using UnityEngine;
using System.Collections;
[AddComponentMenu("Camera-Control/Mouse Orbit with zoom")]
public class MouseOrbitImproved : MonoBehaviour {
public Transform target;
public float distance = 5.0f;
public float xSpeed = 120.0f;
public float ySpeed = 120.0f;
public float yMinLimit = -20f;
public float yMaxLimit = 80f;
public float distanceMin = .5f;
public float distanceMax = 15f;
private new Rigidbody rigidbody;
float x = 0.0f;
float y = 0.0f;
// Use this for initialization
void Start ()
{
Vector3 angles = transform.eulerAngles;
x = angles.y;
y = angles.x;
rigidbody = GetComponent<Rigidbody>();
// Make the rigid body not change rotation
if (rigidbody != null)
{
rigidbody.freezeRotation = true;
}
}
void Update()
{
if (target)
{
x += Input.GetAxis("Mouse X") * xSpeed * distance * 0.02f;
y -= Input.GetAxis("Mouse Y") * ySpeed * 0.02f;
y = ClampAngle(y, yMinLimit, yMaxLimit);
Quaternion rotation = Quaternion.Euler(y, x, 0);
distance = Mathf.Clamp(distance - Input.GetAxis("Mouse ScrollWheel")*5, distanceMin, distanceMax);
RaycastHit hit;
if (Physics.Linecast (target.position, transform.position, out hit))
{
distance -= hit.distance;
}
Vector3 negDistance = new Vector3(0.0f, 0.0f, -distance);
Vector3 position = rotation * negDistance + target.position;
transform.rotation = rotation;
position+=new Vector3(0f,2f,0f);
transform.position = position;
}
}
public static float ClampAngle(float angle, float min, float max)
{
if (angle < -360F)
angle += 360F;
if (angle > 360F)
angle -= 360F;
return Mathf.Clamp(angle, min, max);
}
}
@Anonymous: there is a freeCamera script in the scripts folder, just drag and drop it in the Camera GameObject and deactivate/remove the MouseOrbit script
- Reply
- Reply
- Reply
- Reply
- Reply