mirror of
https://github.com/VRLabs/Raycast-Prefab.git
synced 2026-06-06 00:46:30 +00:00
No description
|
|
||
|---|---|---|
| .github/workflows | ||
| Instancer | ||
| Media | ||
| Resources | ||
| .gitignore | ||
| Instancer.meta | ||
| LICENSE | ||
| LICENSE.meta | ||
| Media.meta | ||
| package.json | ||
| package.json.meta | ||
| Raycast.prefab | ||
| Raycast.prefab.meta | ||
| README.md | ||
| README.md.meta | ||
| Resources.meta | ||
Raycast Prefab
Places an object at the hit point of a raycast
⬇️ Download Latest Version
📦 Add to VRChat Creator Companion
How it works
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
Raycastprefab 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 Targetobject.- If needed, you can move and rotate the
Casting Targetobject until it "aims" at your target.
- If needed, you can move and rotate the
How to Use
- Place the objects you want to raycast under the
ContainerGameObject or constrain them to theContainerGameObject.- World Particles can't be Constrained to the
ContainerGameObject and have to be parented to theContainerobject instead due to "Fix Transforms" affecting the emission location.
- World Particles can't be Constrained to the
- In game, the
Containerobject will raycast down from theCasting Targetonto any Collider which matches the Layers set up in theGrounder's Grounder IK Script (by default this is:Default,Ignore Raycat,WaterandEnvironment).- Note that you can't change layers on your avatar. Local avatar layers will always be
PlayerLocalandMirrorReflection, and remote avatar layers will always bePlayer(with the exception of UIMenu).
- Note that you can't change layers on your avatar. Local avatar layers will always be
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.