|
| 17 May 2014 07:01 AM |
Been a while since I asked a question here. But I'd like to know (WITHOUT RAYCASTING) something.
How do I detect if a player is currently looking at something. Preferably without a tool, but if nessecary a tool would work. |
|
|
| Report Abuse |
|
|
youssef04
|
  |
| Joined: 22 Jan 2011 |
| Total Posts: 1745 |
|
| |
|
|
| 17 May 2014 07:07 AM |
I think you could use the lookVector property of a CFrame or the Target property of a mouse. I'm a bit curious myself, but I believe these properties could work for you.
Here's my siggy... Done. |
|
|
| Report Abuse |
|
|
|
| 17 May 2014 07:12 AM |
| How do I use LookVector and Target? |
|
|
| Report Abuse |
|
|
|
| 17 May 2014 07:22 AM |
For the Target property, you'd have to get the player's mouse (:GetMouse() method). I'm not sure if that'd be good enough though because I'm guessing you're trying to mimic the looking thing from SmoothBlockModel's "Don't Blink" game. I'm curious as well.
Here's my siggy... Done. |
|
|
| Report Abuse |
|
|
|
| 17 May 2014 07:24 AM |
Actually I have never played that. It sounds like it is what I'm thinking of.
I want when someone looks at something they will freeze |
|
|
| Report Abuse |
|
|
|
| 17 May 2014 07:25 AM |
This might help you, got it from the blog post of the Don't Blink game:
"“The dynamic of deciding whether or not a player is actually ‘looking’ at an angel was a really hard concept to code,” he tells me. “For right now, I start with completely dark maps and add PointLights, then check to see whether an angel is within the radius of each light. I had to do some trigonometry to determine the angle of human stares, and some raycasting to determine proximity to each of the walls.”"
Here's my siggy... Done. |
|
|
| Report Abuse |
|
|
|
| 17 May 2014 07:27 AM |
| That is what I was afraid of... Raycasting. I could never figure raycasting out -_- |
|
|
| Report Abuse |
|
|