lskid
|
  |
| Joined: 07 Dec 2012 |
| Total Posts: 89 |
|
|
| 01 Apr 2017 11:55 AM |
So, why is it that mouse.Hit.p only returns an accurate position of the mouse if the player is in first person? It's really beginning to bug me with the game I'm working on.
Lskid |
|
|
| Report Abuse |
|
|
|
| 01 Apr 2017 12:25 PM |
| it is accurate in first and third person... your scripting is inaccurate or you could be hitting walls |
|
|
| Report Abuse |
|
|
ur_famous
|
  |
| Joined: 27 Mar 2013 |
| Total Posts: 246 |
|
|
| 01 Apr 2017 12:27 PM |
mouse.Hit.p should be returning the Vector3 of the CFrame you are pointing to, if anything happens then something is wrong with your game, maybe you have invisible bricks going around?
Signed, eiad999 - ur_famous ~ Holder of India ~ Holder of India of development ~ Founder of Legends Studios ~ Developer of Stormcage Containment Facility... |
|
|
| Report Abuse |
|
|
lskid
|
  |
| Joined: 07 Dec 2012 |
| Total Posts: 89 |
|
|
| 01 Apr 2017 03:47 PM |
I've never seen it in anything else, but
If you point down, towards the surface you're on, it gets MORE accurate, but not dead on (Probably just the dampening) but if you point out to an object, it is all over the place, sometimes even turning in the opposite direction.
Lskid |
|
|
| Report Abuse |
|
|
lskid
|
  |
| Joined: 07 Dec 2012 |
| Total Posts: 89 |
|
|
| 01 Apr 2017 03:48 PM |
The segment that controls it:
wait(1) local players = game:GetService("Players") local player = players[script.Parent.PlayerName.Value] local mouse = player:GetMouse() while true do wait(1/10) script.Parent.BodyGyro.cframe = mouse.Hit end
Lskid |
|
|
| Report Abuse |
|
|
lskid
|
  |
| Joined: 07 Dec 2012 |
| Total Posts: 89 |
|
|
| 01 Apr 2017 03:50 PM |
And yes, the object is rotated properly so that the front side faces the object it points to
Lskid |
|
|
| Report Abuse |
|
|
|
| 01 Apr 2017 03:59 PM |
| you could check if the part is part of a model, then return the primarypart's cframe instead |
|
|
| Report Abuse |
|
|
lskid
|
  |
| Joined: 07 Dec 2012 |
| Total Posts: 89 |
|
|
| 01 Apr 2017 04:00 PM |
It needs to point to cursor position, not to a part
Lskid |
|
|
| Report Abuse |
|
|