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

Parabolic curve is truncated, not working #31

Closed BHSPitMonkey closed 7 years ago

BHSPitMonkey commented 8 years ago

Thanks for creating this!

I've followed the steps in the readme and was able to successfully bake/update my navmesh (everything looks right in the editor, and when I press the circle pad the selectable area looks good).

The problem I'm having is that while I'm aimed at a valid part of the floor, the parabolic curve is truncated to the length of my controller (only the first few inches of it appear, and interestingly I can feel the haptic pulses as I move the controller around). Once I've aimed outside my area, the full parabola becomes visible. Releasing the circle pad has no effect in either case.

Any advice on things to check would be greatly appreciated! I'm pretty new to Unity and parts of it are a bit opaque to me still.

Flafla2 commented 7 years ago

The system uses phyics raycasts to find what objects to hit (i.e. where to stop the parabola). Make sure that there aren't any colliders in the way.

BHSPitMonkey commented 7 years ago

Thanks for the help; There was indeed a collider in my controller model that was being hit, and disabling it allowed the parabola to reach the ground.

However, releasing the pad is not resulting in the rig being teleported, and I'm not seeing the orange circle or play area outline being drawn on the floor while aiming. Here's what I see:

image

BHSPitMonkey commented 7 years ago

Debugging this a bit further, I've found that in ParabolicPointer.cs::Update() that PointOnNavMesh is always being calculated by CalculateParabolicCurve as false (even during the screenshot above, where the parabola appears to be reaching a selectable area). My floor in this example is just a Plane with a regular MeshCollider attached.

Using Unity 5.4.1f1 Personal

BigSol81 commented 7 years ago

I'm having the exact same problem. To troubleshoot the issue, I even completely reinstalled the scripts, created a flat cube with the standard collider on it, baked a NavMesh, updated the NavMesh object within Unity, and it still doesn't work.

My issue is identical to yours. The game renders an area you should be able to teleport to, but the orange indicator simply doesn't appear, and teleporting isn't possible. The parabola is indeed detecting a raycast impact with the collider since it's stopping there, but it's not rendering the orange circle and not allowing teleportation.

dr0idattack commented 7 years ago

I'm having the same issue. I only see the orange part when it goes over a custom box laying on the plane.

mspl13 commented 7 years ago

After investigating in this issue a little bit more I think the original problem is the same as in #15. Everything seems to work if you set the Agent Radius to 0.1 and the Step Height to 0.15. I took the exact values from this comment in #15.

capture capture2

BHSPitMonkey commented 7 years ago

Thanks @mspl13! That fixed the problem for me. Closing this as a duplicate of #15.

Flafla2 commented 7 years ago

A quick note, a varying sample radius (to account for different voxel sizes in the Navmesh) is now officially supported as of 8edbc61. This effectively fixes this issue.