Categories: Swimming

Framerate seems to have an effect on the upward velocity of swimming? – Scripting Assist – Developer Forum

This web page was created programmatically, to learn the article in its authentic location you possibly can go to the hyperlink bellow:
https://devforum.roblox.com/t/framerate-appears-to-affect-the-upward-speed-of-swimming/4295407
and if you wish to take away this text from our website please contact us


For my sport, I’ve created a easy system that modifications the density of a participant’s humanoid elements in order that they don’t float up or down in water when idle. I’ve meticulously adjusted the precise numbers to work with the physique elements that every one gamers are pressured to make use of within the sport, as a result of I’ve seen completely different bundles/packages require completely different adjustment (blocky vs 2.0 vs boy/woman for instance).

I take advantage of this identical system to alter the density for a float software and an anchor software, to drift to the floor of the water and sink to the underside respectively.

There are not any points with this technique and these instruments for essentially the most half so far as I’ve examined, however there’s one obtrusive difficulty with the anchor software. On 60fps, it really works as supposed, however on larger framerates the upwards swimming drive of the participant seems to extend and permits the participant to swim up dramatically quick even whereas the anchor is supplied. This isn’t game-breaking per-say, however I’d quite the participant be unable to swim upwards with the anchor geared up for visible functions.

I haven’t actually tried any options due to how weird the thought of framerate affecting upwards swim velocity and needed to carry it right here first. This occurs with each default and customized swim animations, and the sooner velocity occurs with out the anchor itself being geared up so it’s not that code. It additionally occurs at common density, so this seems to be a problem intrinsic to the engine.

Here is my density altering system, for proof that it has nothing to do with something that framerate would have an effect on:

char = sport:GetService("Players").LocalPlayer.Character or sport.Players.LocalPlayer.CharacterAdded:Wait()

native NormalProps = PhysicalProperties.new(
 5.04, -- density
 0.3, -- friction
 0.5 -- elasticity
)


 for _,half in ipairs(char:GetDescendants()) do
  if half:IsA("BasePart") then
   half.CustomPhysicalProperties = NormalProps
   finish
  finish

Should this be moved to bug stories?

Edit: After some digging, the present obvious wrongdoer is expounded to swimming up utilizing particularly the bounce key… so there’s some bizarre relationship between “jumping” up in water and framerate.


This web page was created programmatically, to learn the article in its authentic location you possibly can go to the hyperlink bellow:
https://devforum.roblox.com/t/framerate-appears-to-affect-the-upward-speed-of-swimming/4295407
and if you wish to take away this text from our website please contact us

fooshya

Share
Published by
fooshya

Recent Posts

What channel are NFL video games on at present? Playoff TV schedule, the best way to watch

This web page was created programmatically, to learn the article in its authentic location you…

5 minutes ago

Play Banishers: Ghosts of New Eden

This web page was created programmatically, to learn the article in its authentic location you…

7 minutes ago

Play NINJA GAIDEN: Ragebound | Xbox Cloud Gaming on  Xbox.com

This web page was created programmatically, to learn the article in its unique location you…

28 minutes ago

GTA 6 LIVE: New recreation ‘tease’ found

This web page was created programmatically, to learn the article in its unique location you…

30 minutes ago

Imagine Your Eyes – The Atlantic

This web page was created programmatically, to learn the article in its authentic location you…

35 minutes ago

Miami Swim & Dive Sweeps Senior Day

This web page was created programmatically, to learn the article in its authentic location you'll…

1 hour ago