HitByBulletEvent Bearing Property Robocode Robot API for .NET
Returns the bearing to the bullet, relative to your robot's heading, in degrees (-180 < getBearing() <= 180).

If you were to TurnRight(event.Bearing), you would be facing the direction the bullet came from. The calculation used here is: (bullet's heading in degrees + 180) - (your heading in degrees)

Namespace: Robocode
Assembly: robocode (in robocode.dll) Version: 1.9.2.0
Syntax

public double Bearing { get; }

Property Value

Type: OnlineDouble
See Also