Teleportals VR Locomotion
HB Engineering & Development
$4.99
(no ratings)
Date |
Price |
---|---|
日期和时间 |
价钱($) |
06/01(2023) |
4.99 |
11/08(2024) |
4.99 |
Jump AssetStore
A unique alternative to other VR locomotion systems, avoiding the dislocation and disembodiment of instant teleporting AND the discomfort of smooth locomotion.This uses the XR Interaction Toolkit as the base for the rig and interactions. Uses some noisecrime files under MIT free use license.This is, as far as I can tell, a novel approach to the use of portals in locomotion. It acts as a middle ground between blink teleportation and the portal movement from games like Budget Cuts. You use a ray cast from your hand to indicate where you want to go, as we're all used to in VR. A portal spawns where you indicated, expanding until it fills your vision. This serves two purposes.First, there is no sense of movement, so you don't have any nausea like with smooth or dash locomotion. Second, there is no disembodiment or loss of sense of physical location caused by the instant transition of a teleport.The system also lets you adjust the speed of the movement, and by default the transition takes longer the farther away you are teleporting. You can also control maximum movement distance.Things not accounted for here (yet):What this looks like to other players (basically you blink teleport from their perspective). I figured you'd have your own ideas for how this should look.I would like to shadowbox the world around the portal during the animation, but I haven't figured out how to do that yet.I don't have any of the niceties of a normal rig, like hands or a body.The custom rig here has two player cameras. It might work with one though...Sound! I'd like to add optional sound effects to drive home the effectPlease send all feedback here: Teleportals FeedbackThanks to Freya Holmér for answering my questions years ago on Twitter regarding the technical approach used in the Budget Cuts portals, which helped me eventually do this. Also thanks to noisecrime who developed the stencil shader I based mine off of. You can find their original project here: GitHub - noisecrime/Unity-StencilPortalRoomCube: Example Unity Project illustrating how to use stencils to create volumes that share the space via portalsPrefabs, script, and shaders to make everything work. Should be fairly drag and drop into your scene. You'll need to select the XR Origin object and add the portal cameras and their parent. Be sure to drag in all three prefabs from the teleportals/prefabs folder, and get rid of other player cameras in your scene.Also, make sure that you have XR Interaction in your scene ahead of time.Uses a custom unlit shader derived from one by NoiseCrime (see shader source for link to original thread and git).Might not be the best code since I'm not a dev by trade. Also I kept my script all in one to make it easy to understand and follow, but you might want to split things out to optimize performance.