playMaker

Author Topic: using a raycast from a camera for UI button in world space  (Read 4431 times)

mike32

  • Playmaker Newbie
  • *
  • Posts: 8
using a raycast from a camera for UI button in world space
« 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

djaydino

  • Administrator
  • Hero Member
  • *****
  • Posts: 7616
    • jinxtergames
Re: using a raycast from a camera for UI button in world space
« Reply #1 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.


mike32

  • Playmaker Newbie
  • *
  • Posts: 8
Re: using a raycast from a camera for UI button in world space
« Reply #2 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

djaydino

  • Administrator
  • Hero Member
  • *****
  • Posts: 7616
    • jinxtergames
Re: using a raycast from a camera for UI button in world space
« Reply #3 on: February 06, 2019, 12:22:41 AM »