Velocity now gets zeroed out if the param is pushed beyond limits.
Rescaled the max speed param.meow-7.2.2
parent
07cc4b2478
commit
73e39abfc7
|
|
@ -3801,7 +3801,7 @@
|
|||
wearable="shape"
|
||||
edit_group="driven"
|
||||
value_default="0"
|
||||
value_min="0"
|
||||
value_min="-1"
|
||||
value_max="1">
|
||||
<param_morph />
|
||||
</param>
|
||||
|
|
@ -4396,7 +4396,7 @@
|
|||
name="Belly_Legs_Physics_UpDown_Driven"
|
||||
wearable="shape"
|
||||
edit_group="driven"
|
||||
value_min="0"
|
||||
value_min="-1"
|
||||
value_max="1">
|
||||
<param_morph />
|
||||
</param>
|
||||
|
|
@ -9141,9 +9141,9 @@ render_pass="bump">
|
|||
edit_group="physics"
|
||||
label_min="Less"
|
||||
label_max="More"
|
||||
value_default=".2"
|
||||
value_default=".1"
|
||||
value_min=".1"
|
||||
value_max=".5"
|
||||
value_max="1"
|
||||
camera_elevation=".3"
|
||||
camera_distance=".8">
|
||||
<param_driver />
|
||||
|
|
@ -9267,9 +9267,9 @@ render_pass="bump">
|
|||
edit_group="physics"
|
||||
label_min="Less"
|
||||
label_max="More"
|
||||
value_default=".1"
|
||||
value_default="0"
|
||||
value_min="0"
|
||||
value_max=".1"
|
||||
value_max="10"
|
||||
camera_elevation=".3"
|
||||
camera_distance=".8">
|
||||
<param_driver />
|
||||
|
|
@ -9358,9 +9358,9 @@ render_pass="bump">
|
|||
edit_group="physics"
|
||||
label_min="Less"
|
||||
label_max="More"
|
||||
value_default=".1"
|
||||
value_default="0"
|
||||
value_min="0"
|
||||
value_max=".1"
|
||||
value_max="10"
|
||||
camera_elevation=".3"
|
||||
camera_distance=".8">
|
||||
<param_driver />
|
||||
|
|
@ -10261,9 +10261,9 @@ render_pass="bump">
|
|||
edit_group="physics"
|
||||
label_min="Less"
|
||||
label_max="More"
|
||||
value_default=".1"
|
||||
value_default="0"
|
||||
value_min="0"
|
||||
value_max=".1"
|
||||
value_max="10"
|
||||
camera_elevation=".3"
|
||||
camera_distance=".8">
|
||||
<param_driver />
|
||||
|
|
@ -10329,9 +10329,9 @@ render_pass="bump">
|
|||
edit_group="physics"
|
||||
label_min="Less"
|
||||
label_max="More"
|
||||
value_default=".1"
|
||||
value_default="0"
|
||||
value_min="0"
|
||||
value_max=".1"
|
||||
value_max="10"
|
||||
camera_elevation=".3"
|
||||
camera_distance=".8">
|
||||
<param_driver />
|
||||
|
|
|
|||
|
|
@ -523,7 +523,7 @@ BOOL LLPhysicsMotion::onUpdate(F32 time)
|
|||
const F32 acceleration_new_local = force_net / behavior_mass;
|
||||
F32 velocity_new_local = mVelocity_local + acceleration_new_local;
|
||||
velocity_new_local = llclamp(velocity_new_local,
|
||||
-behavior_maxspeed*100.0f, behavior_maxspeed*100.0f);
|
||||
-behavior_maxspeed, behavior_maxspeed);
|
||||
|
||||
// Temporary debugging setting to cause all avatars to move, for profiling purposes.
|
||||
if (gSavedSettings.getBOOL("AvatarPhysicsTest"))
|
||||
|
|
@ -535,6 +535,12 @@ BOOL LLPhysicsMotion::onUpdate(F32 time)
|
|||
(position_current_local + velocity_new_local*time_delta) :
|
||||
position_user_local;
|
||||
|
||||
// Zero out the velocity if the param is being pushed beyond its limits.
|
||||
if (position_new_local < 0 || position_new_local > 1)
|
||||
{
|
||||
velocity_new_local = 0;
|
||||
}
|
||||
|
||||
const F32 position_new_local_clamped = llclamp(position_new_local,
|
||||
0.0f,
|
||||
1.0f);
|
||||
|
|
|
|||
Loading…
Reference in New Issue