man, reading through this source code makes me feel like i’m writing my own code wrong… this package is so easy to read and makes so much sense
Gotta love that! Any time I work with any scripters, I emphasize heavily on being able to work on it myself as well. I understand not everyone has the ability to make well written, universal code, but man… when you find someone that does, it’s such a gift to others. Love it!
I’m not sure my changes in the script caused this but I’ve had this issue for a long time where the footsteps were not timed well and the sounds would get mixed up, I have kinda found a solution but I wonder if there was another way without making an extra player script.
Video:
Thank you for open sourcing this system. As far as I have tested it, it works pretty well, however at the moment it doesn’t have a use for my projects, but I can just suggest to use that if you want to make an RPG!
Its quite great but, How would I send the position to server with some security?? for an fps game
Anything sent from the client to the server cannot be secured, what you are looking for is a server-authoritative character controller. I believe this has only been published once on Roblox:
It is Just for a gun using pitch and yaw as the Realism system currently uses. As any incorrect input could be disregarded
You could use this ubiquitous type of script to rubberband players who have moved too far too fast:
local RunService = game:GetService("RunService")
local Players = game:GetService("Players")
-- Store player's positions the last frame
local PreviousPositions = {}
RunService.Heartbeat:Connect(function(Delta)
for _, Player in Players:GetPlayers() do
local Character = Player.Character
-- Make sure we don't create any errors with players who are dead or haven't fully loaded yet
if not Character or Character.Humanoid.Health <= 0 or not Character.PrimaryPart then
PreviousPositions[Player] = nil
continue
end
-- Have they just loaded? Don't care about them until the next frame
if not PreviousPositions[Player] then
PreviousPositions[Player] = Character.PrimaryPart.CFrame - (Vector3.yAxis * Character.PrimaryPart.Position.Y)
continue
end
-- How far have they travelled horizontally?
local Difference = PreviousPositions[Player].Position - (Character.PrimaryPart.Position - Vector3.yAxis * Character.PrimaryPart.Position.Y)
-- Check if they've moved more than they should be able to in a frame (the '* 2' is there for leeway)
if Difference.Magnitude > Character.Humanoid.WalkSpeed * (Delta * 2) then
Character.PrimaryPart.CFrame = PreviousPositions[Player]
end
PreviousPositions[Player] = Character.PrimaryPart.CFrame - Vector3.yAxis * Character.PrimaryPart.Position.Y
end
end)
i mean like, the gun position in world space because this module rotates the player and that changes the shooting position
I know this is very late, however did you work out if these sounds are okay to use or should I be replacing them in my game (from the default module) immediately?
I kind of just gave up on caring because I don’t think anyone’s going to die on a hill for footstep sounds that can be easily reproduced. I’ll go out of my way to make my own if I must, but I honestly don’t think it’s worth getting worried over.
I don’t think realism adds any custom animations, I assume the sword in that video is animated just to show that realism behaves properly when playing custom animations
what game is being played in this video? I’d love to play it
When using streaming enabled, Realism does not work.
Edit: Realism works but as of now you have to die one time for it to kick in.
why is arm are looking weird sometime?
Hello. I’ve been using realism for quite a while for my first person game, and it’s really good! However, I found that when I weld a cap to the head of the character after the character dies places the cap inside the camera for some reason. Here’s a video of welding the cap before and after dying:
I assume this is because this function:
FpsCamera:OnRotationTypeChanged()
is called only once, when the FpsCamera (client module script) is started. And the RunService connection that makes the first person more smooth unbinds after the camera subject (Humanoid) is destroyed.
I tried to call :OnRotationTypeChanged() every time new humanoid is added but it did nothing.
Please let me know if I’m doing something wrong or if I can fix this problem!
Does it work when you zoom out and then zoom back in? I was having similar issues, and for some reason, zooming out fixes it. Quite annoying.