-
Notifications
You must be signed in to change notification settings - Fork 2.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[master] How to draw a ray for the CK controller #1277
Comments
@darax added an initial implementation of pointer rays and arc teleporting rays (like the shell) to Mixed Reality 250. https://github.com/Microsoft/MixedReality250/blob/master/Assets/HoloToolkit/Input/Scripts/ControllerInfo.cs#L332 |
Oh, nice. I'll look there. thanks. |
1. Not useful to see the ray in the editor, I have the headset on my head!
2. Want to see it in the app. Would be a useful addition to the toolkit. I’ll put it in myself, if I figure it out and I’m allowed to.
|
There's been some talk of it. Also, I think the MRDL merge will include these types of things. (See Kevs comment above) |
@keveleigh What's the difference between Microsoft/MixedRealityToolkit-Unity and Microsoft/MixedReality250 where your code examples come from. Cause it seems to also fix the problem with update inconsistencies between controller data and controller visual positions by removing the need for onBeforeRender, which I had trouble with implementing my own ray last week. |
It doesn't remove the need for onBeforeRender, it has an older drop of the Toolkit. The older drop does it wrong according to the guidance I've been given by our platform team, which prompted the script update. Polling in onBeforeRender is the correct way to get the controller info for rendering, while polling in Update or using the InteractionManager events is the correct way to get the controller info for game logic. I'm planning on updating the cursor and pointing ray rendering to fit these new guidelines when I get the time. |
I was under the impression that depending on your logic, onBeforeRender or Update were used, but most often, almost never use both. If onBeforeRender is useful directly prior to rendering, how is Update( ) *more* useful for game logic? If we’re getting the update in the game logic, and we’re about to render, how is that any more proper than getting the values in onBeforeRender? Also, isn’t onBeforeRender more costly (in terms of time) than Update?
|
This is silly question, I'm a bit new to Unity...
I want to draw a ray from the CK controller out into the scene where it's pointing. I reckon I can get the ray start/stop points, but how to draw the actual ray? I'm thinking of using a mostly-transparent cylinder that tapers to a point, and using scaling to modify its length. Is there a better way to do this? Anybody working on some proto-code for a ray drawer that they can share? or, is it already in the toolkit, and I haven't seen it?
The text was updated successfully, but these errors were encountered: