# Reflected Point
Grammar — sourcePoint|Source Point reflected at targetPoint|Target Point with normal facing normalFacing|Angle
Flags —Native
|Function
Returns the point that an object would bounce to if it was travelling from the source point and hit a wall with the specified normal angle at the target point.
# Arguments
point
— Source Pointpoint
— Target Pointfixed
— Normal Facing
Returns — point
native point PointReflect(
point source,
point dest,
fixed angle,
);
# 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
campaigns/liberty.sc2campaign — base.sc2maps/maps/campaign/tarcade.sc2map/MapScript.galaxy:6022
}
lv_currentSawPosition = UnitGetPosition(gv_terraTronSaw);
lv_reflectionVector = PointReflect(gv_lastSawPosition, lv_currentSawPosition, lv_reflectionNormalFacing);
lv_newDestination = libNtve_gf_PointOffsetTowardsPoint(lv_currentSawPosition, 50.0, lv_reflectionVector);
UnitIssueOrder(gv_terraTronSaw, OrderTargetingPoint(AbilityCommand("move", 0), lv_newDestination), c_orderQueueReplace);
campaigns/liberty.sc2campaign/base.sc2maps/maps/campaign/tarcade.sc2map — MapScript.galaxy:6022
}
lv_currentSawPosition = UnitGetPosition(gv_terraTronSaw);
lv_reflectionVector = PointReflect(gv_lastSawPosition, lv_currentSawPosition, lv_reflectionNormalFacing);
lv_newDestination = libNtve_gf_PointOffsetTowardsPoint(lv_currentSawPosition, 50.0, lv_reflectionVector);
UnitIssueOrder(gv_terraTronSaw, OrderTargetingPoint(AbilityCommand("move", 0), lv_newDestination), c_orderQueueReplace);