Skip to content

Commit

Permalink
Merge pull request #77 from hackerspace-ntnu/fix/axe-tower-children
Browse files Browse the repository at this point in the history
Axe shot parenting fix
  • Loading branch information
Fueredoriku committed Feb 22, 2022
2 parents 8d3cac1 + cab8386 commit e21eb85
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ public class AxeProjectile : MonoBehaviour

void Start()
{
Destroy(gameObject, 10f);
Destroy(gameObject, 1f);
}

void OnTriggerEnter(Collider other)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ public void Grab()
public void Shoot()
{
handAxe.enabled = false;
Rigidbody projectileBody = Instantiate(axeProjectilePrefab, spawnPoint.position, spawnPoint.rotation)
Rigidbody projectileBody = Instantiate(axeProjectilePrefab, spawnPoint.position, spawnPoint.rotation, transform)
.GetComponent<Rigidbody>();
projectileBody.velocity = forwardTransform.right * projectileSpeed;
}
Expand Down

0 comments on commit e21eb85

Please sign in to comment.