Terraria
v1.4.4.9
Terraria source code documentation
Toggle main menu visibility
Main Page
Namespaces
Namespace List
Namespace Members
All
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
z
Functions
a
b
c
d
e
f
g
h
i
j
l
m
n
o
p
r
s
t
u
v
w
x
Enumerations
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
z
Classes
Class List
Class Index
Class Hierarchy
Class Members
All
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
~
Functions
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
~
Variables
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Enumerations
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
Properties
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Events
_
a
c
d
e
f
i
l
m
o
p
r
s
t
u
w
Files
File List
File Members
All
Enumerations
Macros
►
Terraria
•
All
Classes
Namespaces
Files
Functions
Variables
Enumerations
Enumerator
Properties
Events
Macros
Loading...
Searching...
No Matches
◆
GetPointOnSwungItemPath()
void
Terraria.Player.GetPointOnSwungItemPath
(
float
spriteWidth
,
float
spriteHeight
,
float
normalizedPointOnPath
,
float
itemScale
,
out
Vector2
location
,
out
Vector2
outwardDirection
)
inline
private
Definition at line
42553
of file
Player.cs
.
42554
{
42555
float
num = (float)
Math
.
Sqrt
(
spriteWidth
*
spriteWidth
+
spriteHeight
*
spriteHeight
);
42556
float
num2
= (float)(
direction
== 1).ToInt() * ((float)
Math
.
PI
/ 2f);
42557
if
(
gravDir
== -1f)
42558
{
42559
num2
+= (float)
Math
.
PI
/ 2f * (
float
)
direction
;
42560
}
42561
outwardDirection
=
itemRotation
.ToRotationVector2().RotatedBy(3.926991f +
num2
);
42562
location
=
RotatedRelativePoint
(
itemLocation
+
outwardDirection
* num *
normalizedPointOnPath
*
itemScale
);
42563
}
System.Collections.Generic.Dictionary
Definition
Dictionary.cs:14
System.Math.Sqrt
static double Sqrt(double d)
System.Math.PI
const double PI
Definition
Math.cs:16
System.Math
Definition
Math.cs:13
Terraria.Entity.direction
int direction
Definition
Entity.cs:24
Terraria.Player.itemRotation
float itemRotation
Definition
Player.cs:1177
Terraria.Player.gravDir
float gravDir
Definition
Player.cs:1587
Terraria.Player.RotatedRelativePoint
Vector2 RotatedRelativePoint(Vector2 pos, bool reverseRotation=false, bool addGfxOffY=true)
Definition
Player.cs:3618
Terraria.Player.itemLocation
Vector2 itemLocation
Definition
Player.cs:1183
References
System.Math.PI
, and
System.Math.Sqrt()
.
Terraria
Player
Generated by
1.10.0