# Bubblehead wars raycast

**URL:** <https://forums.kodeco.com/t/bubblehead-wars-raycast/39712>\
**Category:** Unity Games by Tutorials\
**Created:** [February 22, 2018, 8:55pm UTC](https://forums.kodeco.com/t/bubblehead-wars-raycast/39712 "2018-02-22T20:55:27Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![tulkas](https://s3.amazonaws.com/cdn.raywenderlich.com/community/forum-assets/noun-game-ghost-878668.png) [@tulkas](https://forums.kodeco.com/u/tulkas)\
**Post date:** [February 22, 2018, 8:55pm UTC](https://forums.kodeco.com/t/bubblehead-wars-raycast/39712/1 "2018-02-22T20:55:27Z")

</div>

i´m in the raycast section of bubblehead wars but for some reason the raycast isn’t working, i’ve checked the whole script and i kant finde whats wrong

---

<div class="post-metadata">

**Author:** ![shogunkaramazov](https://assets.chunter.kodeco.com/user_avatar/forums.kodeco.com/shogunkaramazov/32/108826_2.png) [@shogunkaramazov](https://forums.kodeco.com/u/shogunkaramazov)\
**Post date:** [February 22, 2018, 11:54pm UTC](https://forums.kodeco.com/t/bubblehead-wars-raycast/39712/2 "2018-02-22T23:54:49Z")

</div>

@vegetarianzombie @bdmoakley Can you please help with this when you get a chance? Thank you - much appreciated! :]

---

<div class="post-metadata">

**Author:** ![tulkas](https://s3.amazonaws.com/cdn.raywenderlich.com/community/forum-assets/noun-game-ghost-878668.png) [@tulkas](https://forums.kodeco.com/u/tulkas)\
**Post date:** [February 23, 2018, 8:35pm UTC](https://forums.kodeco.com/t/bubblehead-wars-raycast/39712/3 "2018-02-23T20:35:47Z")

</div>

OMG! i finally fixed the script! it was just a typo in the FixedUpdate void, i’m sorry i’m really stupid

---

<div class="post-metadata">

**Author:** ![bdmoakley](https://assets.chunter.kodeco.com/user_avatar/forums.kodeco.com/bdmoakley/32/108772_2.png) [@bdmoakley](https://forums.kodeco.com/u/bdmoakley)\
**Post date:** [February 27, 2018, 9:07pm UTC](https://forums.kodeco.com/t/bubblehead-wars-raycast/39712/4 "2018-02-27T21:07:59Z")

</div>

It happens to all of us! I’m glad you were able to work through it. Cheers!

---

<div class="post-metadata">

**Author:** ![edgekrusher187](https://assets.chunter.kodeco.com/user_avatar/forums.kodeco.com/edgekrusher187/32/76457_2.png) [@edgekrusher187](https://forums.kodeco.com/u/edgekrusher187)\
**Post date:** [July 16, 2018, 2:20am UTC](https://forums.kodeco.com/t/bubblehead-wars-raycast/39712/5 "2018-07-16T02:20:26Z")

</div>

I ran into a similar issue, not sure if it’s the same.

Ensure that the **Main Camera** has the **MainCamera** tag applied in the Inspector. As the documentation states, calling the **main** property on the class **Camera** gets the first enabled camera tagged **MainCamera**.

> **[Unity - Scripting API: Camera.main](https://docs.unity3d.com/ScriptReference/Camera-main.html)**

---

<div class="post-metadata">

**Author:** ![system](https://s3.amazonaws.com/cdn.raywenderlich.com/community/forum-assets/noun-game-ghost-878668.png) [@system](https://forums.kodeco.com/u/system)\
**Post date:** [August 8, 2018, 1:03pm UTC](https://forums.kodeco.com/t/bubblehead-wars-raycast/39712/6 "2018-08-08T13:03:28Z")

</div>

Closed on August 8, 2018, 1:03pm UTC

This topic was automatically closed after 166 days. New replies are no longer allowed.
