pyth_n
|
  |
| Joined: 21 Jun 2016 |
| Total Posts: 1322 |
|
|
| 22 Jul 2016 08:56 AM |
like, moving left, right, forward, back, forward right, forward left, back left, back right.
would I just check isKeyDown? Don't feel like that's the most reliable method.
- pyth_n |
|
|
| Report Abuse |
|
|
|
| 22 Jul 2016 08:58 AM |
MoveDirection i think http://wiki.roblox.com/index.php?title=API:Class/Humanoid/MoveDirection
mom wheres the spaghetti | R$19,427 |
|
|
| Report Abuse |
|
|
| |
|
| |
|
pyth_n
|
  |
| Joined: 21 Jun 2016 |
| Total Posts: 1322 |
|
|
| 22 Jul 2016 09:00 AM |
"Displays the direction that the Humanoid has been set to move (using the Move method)."
does the control script use moveto?
this is for FPS dynamic movement, so if you move left the gun sort of sways to the left.
- pyth_n |
|
|
| Report Abuse |
|
|
|
| 22 Jul 2016 09:01 AM |
yea, it updates movedirection if you move with your keyboard
mom wheres the spaghetti | R$19,427 |
|
|
| Report Abuse |
|
|
pyth_n
|
  |
| Joined: 21 Jun 2016 |
| Total Posts: 1322 |
|
|
| 22 Jul 2016 09:03 AM |
okay. Will it work with the .Changed method or should I use keyboard input changed?
- pyth_n |
|
|
| Report Abuse |
|
|
pyth_n
|
  |
| Joined: 21 Jun 2016 |
| Total Posts: 1322 |
|
| |
|
|
| 22 Jul 2016 09:04 AM |
yea it'll work with .changed
mom wheres the spaghetti | R$19,427 |
|
|
| Report Abuse |
|
|
pyth_n
|
  |
| Joined: 21 Jun 2016 |
| Total Posts: 1322 |
|
|
| 22 Jul 2016 09:08 AM |
shoot me i hate vector3's...
going to have to do something with the humanoidrootpart lookvector I assume?
- pyth_n |
|
|
| Report Abuse |
|
|
|
| 22 Jul 2016 09:13 AM |
HumanoidRootPart.CFrame.lookVector * 500 is forward HumanoidRootPart.CFrame.lookVector * -500 is backward |
|
|
| Report Abuse |
|
|
pyth_n
|
  |
| Joined: 21 Jun 2016 |
| Total Posts: 1322 |
|
|
| 22 Jul 2016 09:15 AM |
Trying to convert it to a vector in relation to the player, like
Vector3.new(-1,0,0) is directly back Vector3.new(1,0,0) is directly forward
etc etc
as evidenced, I have no idea what I'm doing. Trying to picture it on a 2D plane. print(Character:WaitForChild('HumanoidRootPart').CFrame.lookVector.unit - (Character:WaitForChild('Humanoid').MoveDirection).unit)
- pyth_n |
|
|
| Report Abuse |
|
|
pyth_n
|
  |
| Joined: 21 Jun 2016 |
| Total Posts: 1322 |
|
|
| 22 Jul 2016 09:18 AM |
prntscr/bw5hd2 shoot me
- pyth_n |
|
|
| Report Abuse |
|
|
Kodran
|
  |
| Joined: 15 Aug 2013 |
| Total Posts: 5330 |
|
|
| 22 Jul 2016 09:24 AM |
| find the angle and if it's >45 && >315 then forward, >45 && <135 then left etc. |
|
|
| Report Abuse |
|
|
Kodran
|
  |
| Joined: 15 Aug 2013 |
| Total Posts: 5330 |
|
|
| 22 Jul 2016 09:24 AM |
| less than 45 for forward sorry ^^ |
|
|
| Report Abuse |
|
|
pyth_n
|
  |
| Joined: 21 Jun 2016 |
| Total Posts: 1322 |
|
|
| 22 Jul 2016 09:28 AM |
there should be a way to get a vector the way i said like
Vector3.new(-1,0,0) is directly back Vector3.new(1,0,0) is directly forward Vector3.new(0,0,-1) is directly right Vector3.new(0,0,1) is directly left Vector3.new(-.5,0,-.5) is back right
i just cant math
- pyth_n |
|
|
| Report Abuse |
|
|
pyth_n
|
  |
| Joined: 21 Jun 2016 |
| Total Posts: 1322 |
|
|
| 22 Jul 2016 09:31 AM |
I feel like this should work
Events.Dynamic = Character:WaitForChild('Humanoid').Changed:connect(function() print('Dynamic',(Character:WaitForChild('HumanoidRootPart').CFrame.lookVector - Character:WaitForChild('Humanoid').MoveDirection).unit) end)
- pyth_n |
|
|
| Report Abuse |
|
|
Kodran
|
  |
| Joined: 15 Aug 2013 |
| Total Posts: 5330 |
|
|
| 22 Jul 2016 09:31 AM |
| do you want it to just be those or stuff like (-0.25, 0, -0.75) is in between back and left but more back. |
|
|
| Report Abuse |
|
|
pyth_n
|
  |
| Joined: 21 Jun 2016 |
| Total Posts: 1322 |
|
|
| 22 Jul 2016 09:32 AM |
on roblox can't you only move in 8 directions because of how keyboard input works?
- pyth_n |
|
|
| Report Abuse |
|
|
pyth_n
|
  |
| Joined: 21 Jun 2016 |
| Total Posts: 1322 |
|
|
| 22 Jul 2016 09:33 AM |
like on an xbox you can move any variation of degrees because of how a joystick, but with WASD on a keyboard you can only move 8 directions
- pyth_n |
|
|
| Report Abuse |
|
|
|
| 22 Jul 2016 10:01 AM |
Um, you can move in any variation of degrees by going into first person and rotating your mouse?
|
|
|
| Report Abuse |
|
|
pyth_n
|
  |
| Joined: 21 Jun 2016 |
| Total Posts: 1322 |
|
|
| 22 Jul 2016 10:04 AM |
@Justin,
referring to in relation to the humanoids lookVector. You can only move 8 directions in relation to a single look vector.
- pyth_n |
|
|
| Report Abuse |
|
|
|
| 22 Jul 2016 10:05 AM |
Ahh, now I see what you mean. I didn't quite understand until you put it like that.
|
|
|
| Report Abuse |
|
|