Try to Script it yourself because @EgoMoose would likely be busy.
When I will be on my PC, I will also try to fix the Animation Overlap.
Ok. I think i need to change the last part if not then re-script the whole thing.
Thanks, the file:
is now updated.
This is not working for me? characters
Yeah, it was my fault, my F key didn’t work! Good job!
Yes there is. When connecting to a function that indicates fly and unfly you should do something with the gui that can be called by game:GetService("Players").LocalPlayer:WaitForChild("PlayerGui"):WaitForChild("GUIName")
.
Instead of using userinputservice, you use mousebutton1click
I was just going through your flying placefile, and I’m trying to understand why the dot product is used here. Would you mind explaining how this works?
local function onUpdate(dt)
if (isFlying) then
local cf = camera.CFrame;
local direction = cf.rightVector*(movement.right - movement.left) + cf.lookVector*(movement.forward - movement.backward);
if (direction:Dot(direction) > 0) then
direction = direction.unit;
end
bodyGyro.CFrame = cf;
bodyVel.Velocity = direction * humanoid.WalkSpeed * 3;
end
end
when would this activate? as i throught it would activate on space
hello I’m a bit late to this, but would anyone know how to make this mobile supported. I’ve been trying for several days to make this mobile supported but with no luck. any help would be greatly appreciated.
@EgoMoose I am trying to get the Flight controls to work on mobile Dynamic Thumbstick input.
When the character walks around on the ground, the thumbstick works perfectly.
As soon as the character takes flight, the thumbstick stops working. Setting a breakpoint in the handler for ContextActionService:BindAction() I see that the callback is never called while the character is flying.
Do you know how to get the ContextActionService bound actions to fire on mobile input, even when the character is not touching the ground?
Actually I went ahead and solved for the mobile controls!
I posted my remix here
https://www.roblox.com/games/7362782534
This is uncopylocked so please feel free to use this.
Full mobile support! Both classic and dynamic thumbstick!
I noticed the ContextActionService is not firing Enum.PlayerAction reliably on mobile while the character is in flight.
So I added hooks into UserInputService and determine if the player is swiping in the thumbstick area, and then adapt that into the existing movement structure that was in the Fly code already.
Please review it for completeness and accuracy and do let me know if there’s anything I missed!
This is really nice! I appreciate this.
@HCTGT_RBLX I have today published an update to my Mobile Flight Example that makes the motion smooth instead of on/off binary. It’s a lot easier to use on my handset. Please give it a try.
You bet I will. I’m always open to new things.
Awesome script, very clever and well commented! Thank you for sharing
Looks pretty awesome. Thanks for sharing. Would it be relatively straightforward to add a “MIN-HEIGHT” constant so it could be used for spectating a game in progress without the flying player being able to get down to ground level?
Mouse is deprecated and shouldn’t be used. UserInputService has Enums for mouse presses.