mirror of
https://github.com/JulianGro/overte.git
synced 2025-04-13 23:46:29 +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_DAMPING_COEFFICIENT = 2.0*powf(LINEAR_SPRING_CONSTANT,0.5);
|
||||
const float RNOISE = 0.1;
|
||||
const float VDECAY = 5.0;
|
||||
|
||||
// If noise, add a bit of random velocity
|
||||
if (noise) {
|
||||
|
|
|
@ -396,7 +396,7 @@ void simulateHand(float deltaTime) {
|
|||
if (mouse_pressed == 1)
|
||||
{
|
||||
// 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 dy = mouse_y - mouse_start_y;
|
||||
glm::vec3 vel(dx*MOUSE_HAND_FORCE, -dy*MOUSE_HAND_FORCE*(WIDTH/HEIGHT), 0);
|
||||
|
|
Loading…
Reference in a new issue