TModLoader v1.4.4.9
TModLoader source code documentation
Loading...
Searching...
No Matches

◆ MouseWorld

Vector2 Terraria.Main.MouseWorld
staticget

Fetches the position of the mouse cursor in the world.
Useful for making things functionally happen near the cursor, such as projectile or NPC spawns.

Definition at line 2944 of file Main.cs.

2945 {
2946 get
2947 {
2948 //IL_0000: Unknown result type (might be due to invalid IL or missing references)
2949 //IL_0005: Unknown result type (might be due to invalid IL or missing references)
2950 //IL_000a: Unknown result type (might be due to invalid IL or missing references)
2951 //IL_000f: Unknown result type (might be due to invalid IL or missing references)
2952 //IL_0046: Unknown result type (might be due to invalid IL or missing references)
2953 Vector2 result = MouseScreen + screenPosition;
2954 if (player[myPlayer].gravDir == -1f)
2955 {
2956 result.Y = screenPosition.Y + (float)screenHeight - (float)mouseY;
2957 }
2958 return result;
2959 }
2960 }
static int myPlayer
The index in F:Terraria.Main.player of this client's Player. If this is 255, this client is the ser...
Definition Main.cs:1958
static int screenHeight
Definition Main.cs:1870
static Vector2 screenPosition
The position of the top left corner of the screen in world coordinates. Modify in M:Terraria....
Definition Main.cs:1864
static Vector2 MouseScreen
Fetches the position of the mouse cursor on the screen. Useful for making things visually happen nea...
Definition Main.cs:2938
static int mouseY
Definition Main.cs:634
static Player[] player
Definition Main.cs:1960

Referenced by Terraria.Projectile.AI_009_MagicMissiles(), Terraria.Projectile.AI_009_MagicMissiles_Old(), Terraria.Projectile.AI_015_Flails(), Terraria.Projectile.AI_140_MonkStaffT1(), Terraria.Projectile.AI_150_GolfClubHelper(), Terraria.Projectile.AI_160_Kites(), Terraria.GameInput.LockOnHelper.CycleTargetFocus(), Terraria.GameInput.LockOnHelper.CycleTargetThreeDS(), Terraria.Graphics.Capture.CaptureInterface.ModeDragBounds.DragBounds(), Terraria.Main.DrawInterface_3_LaserRuler(), Terraria.Main.DrawInterface_4_Ruler(), Terraria.Main.DrawInterface_6_TileGridOption(), Terraria.Main.DrawProj_DrawNormalProjs(), Terraria.Graphics.Capture.CaptureInterface.ModeEdgeSelection.EdgePlacement(), Terraria.GameInput.LockOnHelper.FindMostViableTarget(), Terraria.Player.FindSentryRestingSpot(), Terraria.GameInput.LockOnHelper.GetClosestTarget(), Terraria.Player.ItemCheck_ManageRightClickFeatures(), Terraria.Player.ItemCheck_OwnerOnlyCode(), Terraria.Player.ItemCheck_Shoot(), Terraria.Player.MinionNPCTargetAim(), Terraria.Player.MinionRestTargetAim(), Terraria.GameInput.LockOnHelper.RefreshTargets(), Terraria.GameInput.LockOnHelper.SetActive(), Terraria.GameContent.SmartCursorHelper.SmartCursorLookup(), and Terraria.Player.SpawnMinionOnCursor().