IDKBlox
|
  |
| Joined: 05 Apr 2013 |
| Total Posts: 1304 |
|
|
| 02 Dec 2017 05:26 PM |
| Is there a way to see which way on mobile the player is moving? like on the gui which way it is pointing? |
|
|
| Report Abuse |
|
|
IDKBlox
|
  |
| Joined: 05 Apr 2013 |
| Total Posts: 1304 |
|
|
| 02 Dec 2017 05:27 PM |
| Oh and same with on xbox, there a way to see which direction they are moving the left joystick? |
|
|
| Report Abuse |
|
|
little5
|
  |
| Joined: 02 Mar 2008 |
| Total Posts: 178 |
|
|
| 02 Dec 2017 05:31 PM |
| workspace.CurrentCamera.CFrame.lookVector |
|
|
| Report Abuse |
|
|
cabbler
|
  |
| Joined: 19 Jun 2015 |
| Total Posts: 735 |
|
|
| 02 Dec 2017 05:32 PM |
| player.Character.Humanoid.MoveDirection |
|
|
| Report Abuse |
|
|
IDKBlox
|
  |
| Joined: 05 Apr 2013 |
| Total Posts: 1304 |
|
|
| 02 Dec 2017 05:44 PM |
| Oh, thank you very much! now one last question, is there a way to see which direction the camera is facing? like up, straight and down? |
|
|
| Report Abuse |
|
|
IDKBlox
|
  |
| Joined: 05 Apr 2013 |
| Total Posts: 1304 |
|
| |
|
Aliics
|
  |
| Joined: 29 Sep 2014 |
| Total Posts: 471 |
|
|
| 02 Dec 2017 06:59 PM |
| little5 actually posted that on his first response. |
|
|
| Report Abuse |
|
|
IDKBlox
|
  |
| Joined: 05 Apr 2013 |
| Total Posts: 1304 |
|
|
| 03 Dec 2017 03:53 AM |
| Not not that. I mean out of up straight and down. Say I'm doing a flying script. What would be good to make the go the direction their screen is facing? Lol like up and down? |
|
|
| Report Abuse |
|
|
cntkillme
|
  |
| Joined: 07 Apr 2008 |
| Total Posts: 44956 |
|
|
| 03 Dec 2017 04:07 AM |
Typically you'd want to move them in the direction you're facing, not just either up, straight, or down.
But essentially
local lookY = cam.CFrame.lookVector.Y
if lookY <= -0.5 then -- go straight down elseif lookY >= 0.5 then -- go straight up else -- go straight end |
|
|
| Report Abuse |
|
|
IDKBlox
|
  |
| Joined: 05 Apr 2013 |
| Total Posts: 1304 |
|
| |
|
|
| 03 Dec 2017 11:22 PM |
@CntKillMe
Isn't the final else unreachable as every number will satisfy x <= .5 or x >=.5
|
|
|
| Report Abuse |
|
|
Soybeen
|
  |
| Joined: 17 Feb 2010 |
| Total Posts: 21462 |
|
|
| 03 Dec 2017 11:25 PM |
^ x <= -.5 not x <= .5
A lot has been suggested, but if you're not using a Humanoid or not moving your Humanoid with the Move method, you could get the velocity of the PrimaryPart |
|
|
| Report Abuse |
|
|