ImpactHitWithTool
A class in Root.Township, Alta.Impact.
An ImpactHit made by an ImpactTool (a weapon or tool swing, or a thrown or dropped item). Adds the tool, the impactor, the contact point and who was holding it.
- Listed in Items, inventory and logic
- Inherits or implements
ImpactHit - Derived types
ImpactHitEvent,ImpactHitUnityevent - Documented in Impacts and hit detection
Constructors
| Member | What it is |
|---|---|
ImpactHitWithTool(ImpactTool tool, ImpactType impactType, ImpactDetector detector, ContactPointStructure contactPoint, float baseHealthDamage, float baseCrippleDamage, float multipliers, float effectiveness) | Creates an ImpactHitWithTool from tool, impactor, detector, contactPoint, start, end, multipliers, effectiveness and channel. |
ImpactHitWithTool(ImpactTool tool, ImpactGenerator impactor, ImpactDetector detector, float multipliers, float effectiveness, ImpactChannel channel, Vector3 point, Vector3 normal) | Creates an ImpactHitWithTool from tool, impactor, detector, contactPoint, start, end, multipliers, effectiveness and channel. |
ImpactHitWithTool(ImpactTool tool, ImpactGenerator impactor, ImpactDetector detector, ContactPointStructure contactPoint, Vector3 start, Vector3 end, float multipliers, float effectiveness, ImpactChannel channel) | Creates an ImpactHitWithTool from tool, impactor, detector, contactPoint, start, end, multipliers, effectiveness and channel. |
Properties
| Member | What it is |
|---|---|
float Distance { get; private set; } | Length of the swept path from Start to End. 1 for a plain collision hit, 0 for a point hit. |
float DurabilityLostMultiplier { get; set; } | Multiplier on durability the tool loses from this hit, 1 by default. |
Vector3 End { get; private set; } | Where the impactor's swept path ended. |
ImpactChannel FirstChannel { get; private set; } | The impact channel the hit came through, or null for plain collision hits. |
Player HittingPlayer { get; } | The player responsible: the wielder, else the tool's owner. Null if neither. |
ImpactGenerator Impactor { get; private set; } | The ImpactGenerator on the tool that made the hit, or null for plain collision hits. |
ContactPointStructure ImpactPoint { get; private set; } | The contact point (point, normal, colliders) of the hit. |
override Vector3 Normal { get; } | Surface normal at the contact point. |
override Vector3 Point { get; } | World position of the contact point. |
Vector3 Start { get; private set; } | Where the impactor's swept path started. |
ImpactTool Tool { get; private set; } | The ImpactTool that made the hit. |
bool WasByPlayer { get; } | True when the tool had a player wielder or owner when the hit was made (not set for plain collision hits). |
Methods
| Member | What it is |
|---|---|
void Hit() | Runs the hit: tells the impactor and tool, then raises ImpactDetector.OnToolHit. |
Used in
Members of other types that take, return or hold a ImpactHitWithTool:
AfkTimer.ResetWithHit, ConfirmationCraftingPart.SyncHit, ConfirmationCraftingPart.ClientSideNailHitSync.ClientSideNailHitSync, GenericCraftingNail.IcClientSideImpact, GenericCraftingPiece.SyncHit, GenericCraftingStation.RequestClientNailHit, GenericCraftingStation.ClientSideNailHitSync.ClientSideNailHitSync, INailable.SyncHit, QuickDrawApplication.Proc, QuickDrawApplication.ValidateHit, BlockedTrigger.Blocked, ColliderModifierSettings.ModifyHit, ContactProjectile.OnHit, DamageMultiplierCollider.ModifyHit, DelayedImpactResolver.ProcessImmediate, DelayedImpactResolver.ImpactDetectorHit.Process, DirectionalMultiplierCollider.ModifyHit, EmbeddableSurface.CheckBreak, HitModifierEffect.PlayEffects, ImpactDetector.IsLocalPlayerBeingHit, ImpactDetector.IsLocalPlayerHittingNonPlayer, ImpactDetector.OnToolHit, ImpactDetector.RenderDamagePopup, ImpactDetector.RunPlayerEvents, ImpactDetector.UpdateDebugDamageDisplayer, ImpactDetector.ImpactSyncArguments.ImpactSyncArguments, ImpactDetectorColliderModifier.ModifyHit, ImpactGenerator.HitImpactDetector, ImpactGenerator.OnHittingImpactDetector, ImpactModifier.ModifyHit, ImpactModifier.OnModifiedHit, ImpactModifierComponent.ModifyHit, ImpactModifierMultiplier.ModifyHit, ImpactModifierStatAffect.ModifyHit, ImpactTool.GenerateHit, ImpactTool.GenerateImpactOnDetector, ImpactTool.GetFullTriggerHit, ImpactTool.Hit, ImpactTool.HitImpactDetector, ImpactTool.OnHittingImpactDetector, ImpactTool.OnGeneratedHit.BeginInvoke, ImpactTool.OnGeneratedHit.Invoke, IToolHitDependant.OnHit, NonDamagingCollider.ModifyHit, TriggerImpactTool.DelayedHit.DelayedHit, TriggerImpactTool.DelayedHit.impactHit, Phantom.KnockBack, SeedSpray.CheckPlant, SeedSpray.BasicImpactSyncArguments.BasicImpactSyncArguments, AreaAttackSkill.DealDamage, AreaAttackSkill.ExecuteWithHit, AreaAttackSkill.ValidateExecutionHit, Arrow.OnHit, BaseImpactChannelProgressionFilter.ApplyImpact, BaseImpactChannelProgressionFilter.GainExperience, BlockingCharge.ApplyCharge, BowStringPullbackInputMethod.ReceiveHit, BreakOnImpact.OnHit, CombatImpactProgressionFilter.ApplyImpact, CylinderImpactCollector.CollectColliders and 51 more.