M1: tune bot physics to stop launch/tip (playtest finding)
First 2-pilot test: bot was too hot (1200N cruise) and top-heavy -> launched off on any nudge. Tamed in-scene: cruiseForce 1200->450, linearDamping 1.5, angularDamping 6, maxAngularVelocity capped at 3, and lowered centerOfMass to (0,-0.6,0) so it's bottom-heavy and resists cartwheeling. Added a host-only debugAutoDriveFull flag on TreadPart to feel two-tread coordination solo. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
e8d72e4649
commit
41d8e29632
2 changed files with 27 additions and 11 deletions
|
|
@ -80,6 +80,11 @@ namespace Jankenbots.Prototype
|
|||
[Range(0f, 0.5f)]
|
||||
public float leanDeadzone = 0.08f;
|
||||
|
||||
// ---- Debug / testing -----------------------------------------------------
|
||||
[Header("Debug / testing")]
|
||||
[Tooltip("HOST ONLY: when true, this tread ignores seat/input and drives at full cruise every FixedUpdate. Lets ONE machine feel two-tread coordination — the host auto-drives one tread while a friend/clone drives the other. Leave OFF for real play.")]
|
||||
public bool debugAutoDriveFull = false;
|
||||
|
||||
// The seat this tread maps to, resolved once from `side`.
|
||||
SeatManager.Seat MySeat => side == Side.Left ? SeatManager.Seat.Left : SeatManager.Seat.Right;
|
||||
|
||||
|
|
@ -149,6 +154,15 @@ namespace Jankenbots.Prototype
|
|||
if (!IsServer) return; // authority guard — clients never simulate
|
||||
if (chassis == null) return;
|
||||
|
||||
// Test affordance: drive full-forward regardless of seat/input, so one
|
||||
// machine can feel two-tread coordination (host drives this tread, a
|
||||
// clone/friend drives the other). Off for real play.
|
||||
if (debugAutoDriveFull)
|
||||
{
|
||||
chassis.AddForceAtPosition(transform.forward * cruiseForce, transform.position, ForceMode.Force);
|
||||
return;
|
||||
}
|
||||
|
||||
// Un-piloted tread goes limp: no pilot → no cached force. (Also clears any
|
||||
// stale input the instant a pilot leaves, so the bot doesn't coast on it.)
|
||||
if (_seats == null || _seats.PilotOf(MySeat) == SeatManager.NoPilot)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue