'mouse more sensitive on pc build than editor
im building a biliard game , i have script on the cue and ontrigger event in the script , at the moment when the cue trigger the cueball i calculate the force of the mouse in the ontrigger event and i add this force to the cueball ,everything okay and the force added to the cueball , but the problem it's when i build the game the mouse produces significantly more force than the editor, it's weird to me since im not multiply the mouse by delta time because from what i know and read mouse its framerate independent, so what can be the issue?thanks in advance.
private void OnTriggerEnter(Collider other)
{
if (other.CompareTag("CueBall"))
{
CalculateCueForce();
AddForceToTheCueBall();
}
}
void CalculateCueForce()
{
cueForce = Input.GetAxis("Mouse X") + Input.GetAxis("Mouse Y");
}
void AddForceToTheCueBall()
{
Vector3 dirToHitTheCueBall = new Vector3(transform.forward.x, 0, transform.forward.z);
cueBall.GetComponent<Rigidbody>().AddForce(dirToHitTheCueBall.normalized * cueForce,
ForceMode.Impulse);
}
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
