Ship contact is a simulation rule: Zone steps Contacts, Unity physics writes no Entity
Contacts.Step exchanges normal velocity between touching hull discs (PostCollisionVelocity moved verbatim from ShieldManager) and publishes Zone.Contacted; ShieldManager presents it; HullCollider.OnCollisionEnter and ShieldManager's ship-on-ship branch are deleted. Not yet built or tested (verification follows). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
parent
efee2a2adc
commit
7392bc8fe1
6 changed files with 363 additions and 26 deletions
|
|
@ -1,17 +1,12 @@
|
|||
using UnityEngine;
|
||||
using CultMath.UnityBridge;
|
||||
|
||||
// Cut 4 (docs/fire-control-cut.md): Hit, Splash, SendHit and SendSplash are deleted -- their last callers
|
||||
// (ConstantLaser, ConstantLightning, ConstantParticleWeapon, HitscanEffect) are gone too (see those
|
||||
// files and FireControl.Detonate, 12.4(b)'s renamed Splash). Nothing decides or applies damage through a Unity
|
||||
// collider any more (R8):
|
||||
// this component is now purely a physics surface for ship-on-ship collision impulse, not hit detection.
|
||||
// collider any more (R8), and no collision callback writes an Entity (cut sim-contact): ship contact is
|
||||
// Zone's, through Contacts.Step. This component holds the hull's collider for authoring, smokes and click
|
||||
// picking, and writes nothing.
|
||||
public class HullCollider : MonoBehaviour
|
||||
{
|
||||
public Entity Entity { get; set; }
|
||||
|
||||
private void OnCollisionEnter(Collision other)
|
||||
{
|
||||
Entity.Velocity += other.impulse.ToCultMath().xz / Time.deltaTime;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue