generic image
Processing...
  • Games
  • Catalog
  • Develop
  • Robux
  • Search in Players
  • Search in Games
  • Search in Catalog
  • Search in Groups
  • Search in Library
  • Log In
  • Sign Up
  • Games
  • Catalog
  • Develop
  • Robux
   
ROBLOX Forum » Game Creation and Development » Scripting Helpers
Home Search
 

Re: Detecting the currently viewed

Previous Thread :: Next Thread 
warspyking is not online. warspyking
Joined: 15 Nov 2011
Total Posts: 13947
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 is not online. youssef04
Joined: 22 Jan 2011
Total Posts: 1745
17 May 2014 07:07 AM
LookVector I think.
Report Abuse
Spongocardo is not online. Spongocardo
Joined: 06 Sep 2008
Total Posts: 2843
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
warspyking is not online. warspyking
Joined: 15 Nov 2011
Total Posts: 13947
17 May 2014 07:12 AM
How do I use LookVector and Target?
Report Abuse
Spongocardo is not online. Spongocardo
Joined: 06 Sep 2008
Total Posts: 2843
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
warspyking is not online. warspyking
Joined: 15 Nov 2011
Total Posts: 13947
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
Spongocardo is not online. Spongocardo
Joined: 06 Sep 2008
Total Posts: 2843
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
warspyking is not online. warspyking
Joined: 15 Nov 2011
Total Posts: 13947
17 May 2014 07:27 AM
That is what I was afraid of... Raycasting. I could never figure raycasting out -_-
Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripting Helpers
   
 
   
  • About Us
  • Jobs
  • Blog
  • Parents
  • Help
  • Terms
  • Privacy

©2017 Roblox Corporation. Roblox, the Roblox logo, Robux, Bloxy, and Powering Imagination are among our registered and unregistered trademarks in the U.S. and other countries.



Progress
Starting Roblox...
Connecting to Players...
R R

Roblox is now loading. Get ready to play!

R R

You're moments away from getting into the game!

Click here for help

Check Remember my choice and click Launch Application in the dialog box above to join games faster in the future!

Gameplay sponsored by:
Loading 0% - Starting game...
Get more with Builders Club! Join Builders Club
Choose Your Avatar
I have an account
generic image