mirror of
https://github.com/overte-org/overte.git
synced 2025-08-09 05:17:02 +02:00
Reduce mouse force on hand.
This commit is contained in:
parent
26a87b3b43
commit
fe2f2d5019
2 changed files with 1 additions and 2 deletions
|
@ -62,7 +62,6 @@ void Hand::simulate(float deltaTime)
|
||||||
const float LINEAR_SPRING_CONSTANT = 500;
|
const float LINEAR_SPRING_CONSTANT = 500;
|
||||||
const float LINEAR_DAMPING_COEFFICIENT = 2.0*powf(LINEAR_SPRING_CONSTANT,0.5);
|
const float LINEAR_DAMPING_COEFFICIENT = 2.0*powf(LINEAR_SPRING_CONSTANT,0.5);
|
||||||
const float RNOISE = 0.1;
|
const float RNOISE = 0.1;
|
||||||
const float VDECAY = 5.0;
|
|
||||||
|
|
||||||
// If noise, add a bit of random velocity
|
// If noise, add a bit of random velocity
|
||||||
if (noise) {
|
if (noise) {
|
||||||
|
|
|
@ -396,7 +396,7 @@ void simulateHand(float deltaTime) {
|
||||||
if (mouse_pressed == 1)
|
if (mouse_pressed == 1)
|
||||||
{
|
{
|
||||||
// Add a velocity to the hand corresponding to the detected size of the drag vector
|
// Add a velocity to the hand corresponding to the detected size of the drag vector
|
||||||
const float MOUSE_HAND_FORCE = 3.0;
|
const float MOUSE_HAND_FORCE = 1.5;
|
||||||
float dx = mouse_x - mouse_start_x;
|
float dx = mouse_x - mouse_start_x;
|
||||||
float dy = mouse_y - mouse_start_y;
|
float dy = mouse_y - mouse_start_y;
|
||||||
glm::vec3 vel(dx*MOUSE_HAND_FORCE, -dy*MOUSE_HAND_FORCE*(WIDTH/HEIGHT), 0);
|
glm::vec3 vel(dx*MOUSE_HAND_FORCE, -dy*MOUSE_HAND_FORCE*(WIDTH/HEIGHT), 0);
|
||||||
|
|
Loading…
Reference in a new issue