logoRemuria

Raycast Prefab

1.2.3 Public
<div align="center">

Raycast Prefab

Generic badge Generic badge Generic badge Generic badge Generic badge

Generic badge Generic badge

Places an object at the hit point of a raycast

Raycast

⬇️ Download Latest Version

📦 Add to VRChat Creator Companion

</div>

How it works

  • Limb IK hierarchy is used with a Grounder to cast an object onto collider surfaces.

Install Guide

https://github.com/VRLabs/Raycast-Prefab/assets/76777936/b97b4dd0-0615-430b-9f10-9a4c40f94d43

  • If you dont already have Final IK installed, download and install the Final IK Stub.
    • Note: Testing in Unity is not possible when using the Final IK Stub!
  • Drag & drop the Raycast prefab into the base of your Hierarchy.
  • Right click and unpack the prefab, then drag & drop it onto your avatar.
  • By default, the raycast aims down from the Casting Target object.
    • If needed, you can move and rotate the Casting Target object until it "aims" at your target.

How to Use

  • Place the objects you want to raycast under the Container GameObject or constrain them to the Container GameObject.
    • World Particles can't be Constrained to the Container GameObject and have to be parented to the Container object instead due to "Fix Transforms" affecting the emission location.
  • In game, the Container object will raycast down from the Casting Target onto any Collider which matches the Layers set up in the Grounder's Grounder IK Script (by default this is: Default, Ignore Raycat, Water and Environment).
    • Note that you can't change layers on your avatar. Local avatar layers will always be PlayerLocal and MirrorReflection, and remote avatar layers will always be Player (with the exception of UIMenu).

Additional notes

  • VRChat uses Final IK v1.9. If you are using a different version you may experience differences in behavior when testing with Final IK.

Performance stats

Constraints:        2
Constraint Depth:   2
Colliders:          1

Hierarchy layout

Raycast
|-Container
|  |-Cube
|  |-Cube
|-IK
|  |-Grounder
|  |  |-Offset
|  |  |  |-End
|-Floor
|-Casting Target

Contributors

License

Raycast Prefab is available as-is under MIT. For more information see LICENSE.

<div align="center">

<img src="https://github.com/VRLabs/Resources/raw/main/Icons/VRLabs.png" width="50" height="50"> <img src="https://github.com/VRLabs/Resources/raw/main/Icons/Empty.png" width="10"> <img src="https://github.com/VRLabs/Resources/raw/main/Icons/Discord.png" width="50" height="50"> <img src="https://github.com/VRLabs/Resources/raw/main/Icons/Empty.png" width="10"> <img src="https://github.com/VRLabs/Resources/raw/main/Icons/Patreon.png" width="50" height="50"> <img src="https://github.com/VRLabs/Resources/raw/main/Icons/Empty.png" width="10"> <img src="https://github.com/VRLabs/Resources/raw/main/Icons/Twitter.png" width="50" height="50">

</div>

Keywords

No keywords found.

Install via VCC

Package ID

dev.vrlabs.raycast-prefab

Unity Version

2022.3

Unity Release

undefined

VRChat Version

undefined

Author

License

MIT

Documentation URL

undefined

Changelog URL

undefined