Physics Raycast no options

cansub 4 years ago updated by Lazlo Bonin (Lead Developer) 4 years ago 7

I want to add a physics raycast but the only Bolt physics options are ontriggers.  I looked at the tutorials on raycasts but I do not have that option available to me.  I have the unity options for screen pointer etc but I need to cast a ray from a gun barrel forward.  Did I do something during the setup?

Bolt Version:
Unity Version:
Scripting Backend:
.NET Version (API Compatibility Level):

Fastest response I've ever received and also the correct response to fix my issue.

Satisfaction mark by cansub 4 years ago
Pending Review

Hi cansub! Welcome to the community.

Are ou making a 2D or 3D game?

For 2D, you will find all raycast units under Codebase > Unity Engine > Physics 2D.

For 3D, you will find them under Codebase > Unity Engine > Physics.

Or you can search for Raycast in the fuzzy finder:

If you still don't see them, this might be a bug. Are you using Unity 2017.1 or 2017.2?

It is a 3D shoot on Windows Universal Platform (mixed reality).  I am using 2017.3.0b2.  That window that you showed (fuzzy finder) is what I expected to see but it is everything but those options.

2017.3! This might explain it ;)

Try opening the Unit Options Wizard under Tools > Bolt.

Then, on the assemblies page, add a new assembly. Look for UnityEngine.Physics (which was added in 2017.2 I think).

Then, in the next page, make sure you have the Physics classes in your type options:

Finally, regenerate the unit options.

Let me know if that works!

You got'er otter! It was just the missing UnityEngine.Physics Assembly.  Thanks!


Awesome! Glad you got it working.

I'll add Physics to the default options in the next version.

The UnityEngine.CoreModule was missing as well.  It didn't have access to transforms or gameobjects.  I got that one figured out but it is a bit of a pain having to find them and add them.  Bug?


Yes, I noticed that as well. Both UnityEngine.Physics and UnityEngine.Core will be added to the default options starting from next version. 

It's not a bug per se, it's that Unity is currently modularizing the engine (splitting it into smaller, self contained pieces), which IIRC is meant to reduce build sizes or provide new features like headless servers. In part of that effort, they moved components to other assemblies, but apparently didn't document it anywhere. 

So far Physics and Core seem to be the only changes in 2017.2 and 2017.3, but let me know if you find anything else that's missing.

Edit: to be clear, you only need to add the assemblies to your settings this one time. The options are saved even if you exit Unity, you won't have to re-add them every time you regenerate your unit database.