Flafla2 / Vive-Teleporter

A framework for Unity3D that automatically generates teleporter boundaries and facilitates the teleporter mechanic, similarly to Valve's "The Lab"
MIT License
394 stars 93 forks source link

Teleporting Halfway into the ground? #8

Closed johngillett closed 8 years ago

johngillett commented 8 years ago

I've gone through the setup steps numerous times, I've tried moving my floor up and down as well, and everything seems to be working like normal, except the ground is always about chest-high after I teleport once, and I remain at that height after subsequent teleports. I'll note that the indicator circle where you're supposed to end up is displayed at the correct height. The parabola, though, falls through to a lower point.

At first I thought it might be because I scaled my Main Rig object up to twice its original size, but after scaling it back to default the issue remains.

I've been able to "fix" it by changing this line in the TeleportVive script:

offset.y = 0;

I simply changed the value to .75f; This still leaves the parabola pointing lower than my actual floor, but everything else works as I'd like to. I'm just wondering at this point if its an issue with my own setup or something else.

EDIT: I've realized this is probably intended functionality. I was under the impression your script would land the whole rig on top of whatever ground you used for the navMesh. Rather than requiring users to position their world around this script, perhaps you can add another optional variable for where the ground position is?

Flafla2 commented 8 years ago

Hmm, this seems like a bug of course. I'll take a look.

Flafla2 commented 8 years ago

Just took a look, the height parameters are working as expected. I just noticed your edit - you are correct, the system only supports one height at this time, for optimization reasons (perhaps I can relook at this when #9 is addressed). Supporting multiple heights means polling the navmesh around 15 times per frame (one for each point on the parabolic pointer) and right now that just can't happen.

...perhaps you can add another optional variable for where the ground position is?

This exists, see "Ground Height" in the Parabolic Pointer component.

Flafla2 commented 8 years ago

Hello, an update on this issue. As of version 2.0.0 the system now supports multiple ground levels.

Get it here:

https://github.com/Flafla2/Vive-Teleporter/releases/tag/v2.0.0