2026-07-12
2026-07-13 / 2026-07 / 2026-07-11
日曜日
https://x.com/fujiphone/status/2075829983319404581
https://nuhme.jp/burnable-hearts
https://www.fujiphone.jp/
Burnable Hearts!
(日記)趣味でティッシュを配る奴もいる|藤本薪(fujiphone) https://note.com/fujiphone/n/nbd3ab321516d
https://www.youtube.com/watch?v=F9tDDqEeCrU
なんかしれっとツインズひなひまのSeason2みたいなのが始まってる
今までショート動画がちょいちょい更新されてたけど、急に来たな
「“壺おじ”の動きがうまく再現できない」と悩むユーザー投稿にまさかの“本人解説”が寄せられ話題に。「ソースコードお披露目」付き丁寧レクチャー - AUTOMATON https://automaton-media.com/articles/newsjp/getting-over-it-20260711-454547/
Getting Over It with Bennett Foddy
https://www.reddit.com/r/howdidtheycodeit/comments/1ury1w0/how_did_bennett_foddy_achieve_the_hammer_mechanic/
code:n.cs
Vector2 mw = (Vector2)fakeCursorRB.position;
//this value ranges between 0.1 and 0.4
mouseVelocityAverage =
Mathf.Lerp(mouseVelocityAverage, Mathf.Max(0.1f * mouseInput.magnitude, 0.001f), 0.05f) + 0.005f;
//move fake cursor - using acceleration
Vector2 newPosition = fakeCursorRB.position + mouseInput;//* mouseVelocityAverage;
//clamp to radius
float distanceToPlayer = ((Vector2) transform.position - newPosition).magnitude;
if (distanceToPlayer > 3.5f)
{
newPosition = (Vector2) transform.position +
((newPosition - (Vector2) transform.position).normalized * 3.5f);
}
Vector2 tipDelta = (Vector2) tipRB.position - mw;
Vector2 poleDir = (Vector2) (tipRB.position - hjRB.position).normalized; //hjRB is the hinge joint RB
//a dot product is used to make the rotation dominate when the mouse is perpendicular to the pole
dotProd = Vector2.Dot(poleDir, tipDelta.normalized);
posDelta = tipDelta.magnitude * dotProd;
//move back to tip head
newPosition += 0.5f * tipDelta * Mathf.Clamp(0.2f - Mathf.Min(mouseVelocityAverage,0.2f), 0, 0.2f);
fakeCursorRB.MovePosition (newPosition);
fakeCursorRB.velocity = (newPosition - fakeCursorRB.position);
Vector2 mwDelta = (Vector2)hjRB.position-mw;
Vector2 tDelta = hjRB.position - tipRB.position;
float angleDelta = Vector2.SignedAngle(tDelta,mwDelta); //hingeJoint2D.angle no longer works accurately
//different behavior close vs far
angleDelta = Mathf.Sign(angleDelta) * Mathf.Max(Mathf.Abs(angleDelta/2f), Mathf.Abs(angleDelta * angleDelta));
angleDelta *= Mathf.Clamp01 (Mathf.Abs (angleDelta) / angleEpsilon);
motor.motorSpeed = Mathf.Clamp( (angleDelta * (3f) + (angleDelta - oldAngle) * 0.00f) * Mathf.Pow(Mathf.Clamp01(mwDelta.magnitude/deadzone),2), -800f,800f);
hj.motor = motor;
float speedFactor = 16f - Mathf.Max(sj.reactionTorque*0.008f ,5f); //had to make this stronger, no idea why
float axisBlend = Mathf.Pow(dotProd,4);
slider.motorSpeed = Mathf.Clamp(-posDelta*Mathf.Abs(posDelta) * speedFactor * axisBlend,-50f,50f);
sj.motor = slider;
oldAngle = angleDelta;
2026-07-13 / 2026-07 / 2026-07-11
日曜日