MixedRealityToolkit-Unity icon indicating copy to clipboard operation
MixedRealityToolkit-Unity copied to clipboard

Request for a Parabolic Pointer as an alternate Pointer Ray

Open hridpath opened this issue 8 years ago • 7 comments

Overview

I have been attempting to create a parabolic pointing ray as a part of the teleporting scenario. I have the logic to produce an arced line but I am combatting the FocusManager using the InputSourcePointer.

Expected Behavior

I would like to see a pointer that follows kinimatic trajectory rules. Much like the teleport functions of the Mixed reality portal Cliff house, teleporting from the ground to the roof.

This would allow for a player to teleport up steps or climb rock ledges. Currently the straight ray will collide with the bottom of a step which can put the position off.

Unity Editor Version

MRTP5

Mixed Reality Toolkit Release Version

Dev_Branch

hridpath avatar Dec 08 '17 20:12 hridpath

@Railboy this is on the list of things from MRDL, correct?

StephenHodgson avatar Dec 08 '17 21:12 StephenHodgson

Correct. Keep an eye on #1486 for the Feature_MultiPointers branch. We have a new line pointer in there now, and a parabolic teleportation pointer will follow shortly.

It makes use of the Parabola and LineStripMesh classes if you want to experiment with rolling your own.

Railboy avatar Dec 08 '17 22:12 Railboy

@Railboy I would be very interested in what your appoach will be for the ParabolicPointer. The line is pretty easy if you have the points, but I would expect to get the point returned as the intersection for the ray of the last(end) point on the line and the collider found. For example, If there is a chair that can be 'sittable' (has a clollider) but you want to find a point in-line just beyond the chair, a standard ray will give the chair as a hit instead. But by using a trajectory that carries the ray over the chair you would hit the point you want. Does this make sense to you?

hridpath avatar Dec 11 '17 06:12 hridpath

Related previous PRs by @Railboy for the parabolic + multistep pointer #1318 #1332 #1305 #1364

cre8ivepark avatar Dec 11 '17 18:12 cre8ivepark

@hridpath As @cre8ivepark points out we've replaced the single pointer ray with an array of RaySteps so that pointers can support bendy / curved / warped trajectories. We just committed an experimental parabolic pointer to #1486 if you want to give it a try. (Keep in mind that this PR is an evolving WIP.)

Railboy avatar Dec 11 '17 21:12 Railboy

@Railboy From what I can see in the Features code, it appears that you are using a camera attached to the controller forward position that will rotate with the controller. Is this correct? Then you Lerp to the endpoint?
I have code that calculates the trajectory based on gravity and angle of elevation. with a resolution property to define the size of the array of points along the trajectory over a fixed period of time. How can I get the elevation by using the Camera's rotation off the xz plane?

hridpath avatar Dec 12 '17 22:12 hridpath

Closing issues older than 180 days. If this is still an issue, please reactivate with recent information.

wiwei avatar Apr 11 '19 20:04 wiwei