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 » Scripters
Home Search
 

Re: Direction Mobile is moving?

Previous Thread :: Next Thread 
IDKBlox is not online. 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 is not online. 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 is not online. little5
Joined: 02 Mar 2008
Total Posts: 178
02 Dec 2017 05:31 PM
workspace.CurrentCamera.CFrame.lookVector
Report Abuse
cabbler is not online. cabbler
Joined: 19 Jun 2015
Total Posts: 735
02 Dec 2017 05:32 PM
player.Character.Humanoid.MoveDirection
Report Abuse
IDKBlox is not online. 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 is not online. IDKBlox
Joined: 05 Apr 2013
Total Posts: 1304
02 Dec 2017 06:22 PM
Anyone?
Report Abuse
Aliics is not online. 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 is not online. 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 is not online. 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 is not online. IDKBlox
Joined: 05 Apr 2013
Total Posts: 1304
03 Dec 2017 11:20 PM
Thank you!
Report Abuse
greedyawesomeman is not online. greedyawesomeman
Joined: 18 Apr 2010
Total Posts: 1038
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 is not online. 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
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripters
   
 
   
  • 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