Playmaker Forum
PlayMaker Help & Tips => PlayMaker Help => Topic started by: PET on August 08, 2016, 05:43:30 AM
-
Hello there,
I have a cube that has multiple states. When it gets to a particular state I want to cast a Raycast from the Player and I want to check if the Player is looking at the Cube. If the Player looks at the cube do an event.
Any idea why this does not work?
(http://puu.sh/qtN9p/906e92aa8e.png)
I tried to even put the Raycast on the player itself to test this... I checked the Debug so I can see the Yellow line. No line :( so the Raycast does not work.
What am I doing wrong?
Thank You
P.S. I did a test with Mouse Pick Event and that one works.
-
Hello,
in the screenshot there is no direction set, to shoot forward set it x 0; y 0; z 1
-
Thanks man!
How do I check whether my object only hit's a particular object? If I look at the ground the Raycast will "hit" because I hit the Terrain Mesh Collider, and I only want this to check if it hits the Cube.
Thanks
-
I usually use Layer Mask option to raycast only specific layers, so you have to set the layer for that object you want to hit.
-
Thanks for the help!