stretch cursor idle loop

This commit is contained in:
ethan merchant 2024-12-08 00:11:53 -05:00
parent cabd123404
commit e5c6514b67

View file

@ -31,6 +31,13 @@ static class Stretch
public static void Frame() public static void Frame()
{ {
if (!from_grab.Held && !to_grab.Held)
{
from_grab.pose.orientation = Quat.Identity;
to_grab.pose.orientation = Quat.Identity;
from_grab.pose.position = to_grab.pose.position - Vec3.Forward * ((15 * U.cm) - (MathF.Sin(Time.Totalf * 3f) * 4 * U.cm));
}
Vec3 delta = to_grab.pose.position - from_grab.pose.position; Vec3 delta = to_grab.pose.position - from_grab.pose.position;
stretch = Maths.max(delta.Magnitude - deadzone, 0); stretch = Maths.max(delta.Magnitude - deadzone, 0);