5
5
namespace Unity . Multiplayer . Samples . BossRoom . Server
6
6
{
7
7
/// <summary>
8
- /// Action responsible for creating a projectile object.
8
+ /// Action responsible for creating a physics-based thrown object.
9
9
/// </summary>
10
10
public class TossAction : Action
11
11
{
@@ -15,8 +15,7 @@ public TossAction(ServerCharacter parent, ref ActionRequestData data) : base(par
15
15
16
16
public override bool Start ( )
17
17
{
18
- //snap to face the direction we're firing, and then broadcast the animation, which we do immediately.
19
- //m_Parent.physicsWrapper.Transform.forward = Data.Direction;
18
+ // snap to face the direction we're firing
20
19
21
20
if ( m_Data . TargetIds != null && m_Data . TargetIds . Length > 0 )
22
21
{
@@ -71,7 +70,7 @@ ActionDescription.ProjectileInfo GetProjectileInfo()
71
70
}
72
71
73
72
/// <summary>
74
- /// Instantiates and configures the arrow . Repeatedly calling this does nothing.
73
+ /// Instantiates and configures the thrown object . Repeatedly calling this does nothing.
75
74
/// </summary>
76
75
/// <remarks>
77
76
/// This calls GetProjectilePrefab() to find the prefab it should instantiate.
@@ -88,7 +87,7 @@ void Throw()
88
87
89
88
var networkObjectTransform = no . transform ;
90
89
91
- // point the projectile the same way we're facing
90
+ // point the thrown object the same way we're facing
92
91
networkObjectTransform . forward = m_Parent . physicsWrapper . Transform . forward ;
93
92
94
93
networkObjectTransform . position = m_Parent . physicsWrapper . Transform . localToWorldMatrix . MultiplyPoint ( networkObjectTransform . position ) +
0 commit comments