# Interpolated Point
Grammar — Point interpolated from sourcePoint to targetPoint by fraction fraction
Flags —Native
|Function
Returns a point along the line defined by the two given points. The position along the line is determined by the given fraction. 0.0 means the source point, 1.0 means the target point, and 0.5 means half-way between the two. Values outside the 0.0 to 1.0 range result in valid extrapolations along the line beyond the given points.
# Arguments
point
— Source Pointpoint
— Target Pointfixed
— Fraction
Returns — point
native point PointInterpolate(
point source,
point dest,
fixed fraction,
);
# Related
Category: Point / Offsets
- Point Facing Angle —
point
— libNtve_gf_PointFacingAngle - Point With Z Offset —
point
— libNtve_gf_PointWithZOffset - Point With Offset —
point
— PointWithOffset - Point With Polar Offset —
point
— PointWithOffsetPolar - Point Offset Towards Point —
point
— libNtve_gf_PointOffsetTowardsPoint - Random Point Between Points —
point
— libNtve_gf_RandomPointBetweenPoints - Reflected Point —
point
— PointReflect - Interpolated Point —
point
— PointInterpolate - Mid-Point —
point
— MidPoint
# Examples
mods/heromods/genji.stormmod — base.stormdata/LibHGen.galaxy:631
else {
lv_interpolationFraction = (lv_interpolationFraction - 0.05);
lv_interpolationPoint = PointInterpolate(lv_genjiPosition, lv_initialTargetPoint, lv_interpolationFraction);
}
}
mods/novastoryassets.sc2mod — base2.sc2maps/maps/campaign/nova/nova05.sc2map/MapScript.galaxy:1229
}
if (((lv_shotCount == 0) || (libLotv_gf_DifficultyValueInt2(1, 1, 0, 0) == 1))) {
gf_BonusObjectiveEradicatorCannonAttack(PointInterpolate(lv_startPoint, lv_endPoint, lv_interpolationOffset));
}
else {
mods/novastoryassets.sc2mod — base2.sc2maps/maps/campaign/nova/nova05.sc2map/MapScript.galaxy:1232
}
else {
gf_BonusObjectiveEradicatorCannonAttackNoTurn(PointInterpolate(lv_startPoint, lv_endPoint, lv_interpolationOffset));
}
lv_shotCount += 1;
mods/novastoryassets.sc2mod/base2.sc2maps/maps/campaign/nova/nova05.sc2map — MapScript.galaxy:1229
}
if (((lv_shotCount == 0) || (libLotv_gf_DifficultyValueInt2(1, 1, 0, 0) == 1))) {
gf_BonusObjectiveEradicatorCannonAttack(PointInterpolate(lv_startPoint, lv_endPoint, lv_interpolationOffset));
}
else {
mods/novastoryassets.sc2mod/base2.sc2maps/maps/campaign/nova/nova05.sc2map — MapScript.galaxy:1232
}
else {
gf_BonusObjectiveEradicatorCannonAttackNoTurn(PointInterpolate(lv_startPoint, lv_endPoint, lv_interpolationOffset));
}
lv_shotCount += 1;
mods/starcoop/starcoop.sc2mod — base.sc2data/LibCOMU.galaxy:194
lv_indexReal = 0.0;
for ( ; ( (autoDFAB3E98_ai >= 0 && lv_indexReal <= autoDFAB3E98_ae) || (autoDFAB3E98_ai < 0 && lv_indexReal >= autoDFAB3E98_ae) ) ; lv_indexReal += autoDFAB3E98_ai ) {
if ((RegionContainsPoint(lp_testRegion, PointInterpolate(lp_pointA, lp_pointB, lv_indexReal)) == true)) {
return true;
}
mods/starcoop/starcoop.sc2mod — base.sc2data/LibCOMU.galaxy:2069
if ((UnitAbilityGetCooldown(lp_aIUnit, "MutatorAmonKhaydarinMonolith", "Abil/MutatorAmonKhaydarinMonolith") <= 0.0)) {
libNtve_gf_AICast(lp_aIUnit, OrderTargetingPoint(AbilityCommand("MutatorAmonKhaydarinMonolith", 0), PointInterpolate(UnitGetPosition(lp_aIUnit), UnitGetPosition(UnitGroupRandomUnit(lp_nearByUnits, c_unitCountAlive)), -0.5)));
return ;
}
mods/starcoop/starcoop.sc2mod — base.sc2data/LibCOMU.galaxy:2074
if ((UnitGetCooldown(lp_aIUnit, "SpawnPhaseCannon") <= 0.0)) {
libNtve_gf_AICast(lp_aIUnit, OrderTargetingPoint(AbilityCommand("MutatorAmonPhaseCannon", 0), PointInterpolate(UnitGetPosition(lp_aIUnit), UnitGetPosition(UnitGroupRandomUnit(lp_nearByUnits, c_unitCountAlive)), 0.5)));
return ;
}
mods/starcoop/starcoop.sc2mod — base.sc2data/LibCOMU.galaxy:7616
}
libNtve_gf_CreateUnitsWithDefaultFacing(1, "MutatorCandyBowl", 0, 0, PointInterpolate(PlayerStartLocation(1), PlayerStartLocation(2), 0.5));
libCOMU_gv_cT_CandyBowlUnit = UnitLastCreated();
UnitStatusBarClearOverride(libCOMU_gv_cT_CandyBowlUnit);
mods/starcoop/starcoop.sc2mod — base.sc2data/LibCOMU.galaxy:13253
libCOMU_gf_CT_TrickOrTreaterLogic(UnitLastCreated());
}
UnitGroupIssueOrder(UnitLastCreatedGroup(), OrderTargetingPoint(AbilityCommand("attack", 0), PointInterpolate(PlayerStartLocation(1), PlayerStartLocation(2), 0.5)), c_orderQueueReplace);
UnitGroupAddUnitGroup(libCOMU_gv_cT_OnDeathSpawns, UnitLastCreatedGroup());
libCOMU_gf_CT_RegisterSpawnedUnitGroup(UnitLastCreatedGroup());