NVI
|
  |
| Joined: 11 Jan 2009 |
| Total Posts: 4744 |
|
|
| 11 May 2012 10:42 PM |
| This sounds pretty trivial, but my current method simply doesn't work. I'm basically checking if the camera's CoordinateFrame is within 3 studs of the positon of the character's head. I don't really know where it's going wrong because, of course, we have no debugging online. |
|
|
| Report Abuse |
|
|
Legend26
|
  |
| Joined: 08 Sep 2008 |
| Total Posts: 10586 |
|
|
| 11 May 2012 10:56 PM |
"we have no debugging online."
...........
Start Server + Start Player or Online mode, doesn't matter.
AppData\Local\Roblox\Logs
Start reading. |
|
|
| Report Abuse |
|
|
MM233
|
  |
| Joined: 19 Jun 2008 |
| Total Posts: 925 |
|
|
| 11 May 2012 11:07 PM |
| Lock First Person, or simply scrolled in first person? Because for the prior, you could find the player and look at the CameraMode Enum. I believe it has only 2 values, Classic and LockFirstPerson. |
|
|
| Report Abuse |
|
|
NVI
|
  |
| Joined: 11 Jan 2009 |
| Total Posts: 4744 |
|
| |
|
| |
|
|
| 12 May 2012 05:46 AM |
I edited a free modeled FPS script so that it detects if the player's camera is FPS or not, however, in offline it works perfectly, but in online, I'm not sure.
☜▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬☜☆☞▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬☞ - Candymaniac, a highly reactive substance. |
|
|
| Report Abuse |
|
|
| |
|
Oysi
|
  |
| Joined: 06 Jul 2009 |
| Total Posts: 9058 |
|
| |
|
Legend26
|
  |
| Joined: 08 Sep 2008 |
| Total Posts: 10586 |
|
|
| 12 May 2012 10:14 AM |
| It's the thread scheduler files that are useful. Check the date modified. Roblox usually creates two or more for a single game. |
|
|
| Report Abuse |
|
|
NVI
|
  |
| Joined: 11 Jan 2009 |
| Total Posts: 4744 |
|
|
| 12 May 2012 10:44 AM |
I don't want to lock the camera in first-person, that's why I'm _detecting_ it. Thanks though.
None of those log files had any information. I looked at all of them. I know there had to have been something wrong though because I put a TextLabel in to report the distance and it was never changed. It had to have reached that code because it was in a loop in the top level scope. |
|
|
| Report Abuse |
|
|
Oysi
|
  |
| Joined: 06 Jul 2009 |
| Total Posts: 9058 |
|
| |
|
NVI
|
  |
| Joined: 11 Jan 2009 |
| Total Posts: 4744 |
|
|
| 12 May 2012 10:50 AM |
Yeah, Oysi, that's the infuriating part. I've had this working elsewhere too, and I copied the code exactly without any luck.
local cam = workspace.CurrentCamera local rel = cam.CoordinateFrame.p - script.Parent.Parent.Parent.Character.Head.Position local d2 = rel.x * rel.x + rel.y * rel.y + rel.z * rel.z if d2 < 3 * 3 then --stuff end |
|
|
| Report Abuse |
|
|
Oysi
|
  |
| Joined: 06 Jul 2009 |
| Total Posts: 9058 |
|
| |
|
NVI
|
  |
| Joined: 11 Jan 2009 |
| Total Posts: 4744 |
|
|
| 12 May 2012 10:56 AM |
| Blarg. Apparently my own Pythagorean implementation isn't good enough for Roblox. I switched it to magnitude and it works. I didn't really want a square-root for each suit every 1/20th of a second though. |
|
|
| Report Abuse |
|
|
Oysi
|
  |
| Joined: 06 Jul 2009 |
| Total Posts: 9058 |
|
| |
|
Oysi
|
  |
| Joined: 06 Jul 2009 |
| Total Posts: 9058 |
|
| |
|