VS plugin mod for Basic Armour
| Revision | e4669b1980077b0282b8938cd0902eae5e7d6717 (tree) |
|---|---|
| Time | 2019-08-01 07:46:31 |
| Author | |
| Commiter | melchior |
important notes for future shield deflection...
| @@ -150,7 +150,17 @@ namespace ArmourMod | ||
| 150 | 150 | float beforeDamage = damage; |
| 151 | 151 | //TODO: evaluate postion vector of strike to determine WHEN position of armour offers protection |
| 152 | 152 | |
| 153 | - #if DEBUG | |
| 153 | + /* | |
| 154 | + you can probably get the dot product of sourceEntity.LocalPos.Motion.Copy().Normalize() and targetEntity.LocalPos.AheadCopy(1) | |
| 155 | + | |
| 156 | + which is 0 when the arrow hits dead front | |
| 157 | + | |
| 158 | + and abs(dp)>=1 for angles greater than 90 degrees | |
| 159 | + | |
| 160 | + https://en.wikipedia.org/wiki/Dot_product#Geometric_definition | |
| 161 | + GetViewVector() | |
| 162 | + */ | |
| 163 | +#if DEBUG | |
| 154 | 164 | Logger.VerboseDebug($"DamageSource:{damageSource.Source} HitPos:{damageSource.HitPosition} Type: {damageSource.Type} Entity: {damageSource.SourceEntity} Block: {damageSource.sourceBlock} ORIGIN : {damageSource.sourcePos} "); |
| 155 | 165 | #endif |
| 156 | 166 |