Playmaker Forum

PlayMaker Help & Tips => PlayMaker Help => Topic started by: mike32 on January 31, 2019, 07:06:48 AM

Title: using a raycast from a camera for UI button in world space
Post by: mike32 on January 31, 2019, 07:06:48 AM
HI

I have been working on a first person game with various interactions and need to control some animations

I need to use a raycast from my camera to interact with UI button in world space but cant figure out how it works.

Any help or examples on how it would be setup with playmaker would be really appreciated?

Thanks

Mike
Title: Re: using a raycast from a camera for UI button in world space
Post by: djaydino on January 31, 2019, 11:45:06 AM
Hi,
This video can help maybe, its directly not from the camera, but i think you can understand how to do it.
If not let me know.

Title: Re: using a raycast from a camera for UI button in world space
Post by: mike32 on February 05, 2019, 04:31:13 AM
Hi djaydino

Thanks for the help, I have the raycast working but still having trouble understanding how I can get the raycast to interact with a UI button on a world space canvas.

It reacts to a cursor correctly if the cursor is not locked but stops working if I lock the cursor which I need for the project.

Is there a way I can get the UI Button to respond to the raycast like a normal click?

Thanks for your help

Mike
Title: Re: using a raycast from a camera for UI button in world space
Post by: djaydino on February 06, 2019, 12:22:41 AM
Hi.

I think this unity answer might be helpful :

https://answers.unity.com/questions/941790/world-space-unityui-buttons.html