#Find the "tension" on a rope constraint

1 messages · Page 1 of 1 (latest)

tranquil cairn
#

I'm trying to simulate "tension" on a RopeConstraint. The attachment also has a LinearVelocity constraint acting on it. How would I find the tension?

vapid sentinel
#

T = m * a

tranquil cairn
#

Does this seem accurate? @potent coral

delicate turtle
#

well tension how

#

is it like a part stuck to a wall

#

i mean the string

tranquil cairn
#

(a "fish")

delicate turtle
#

i dont understand the situation

#

break it down like its a physics problem at school

tranquil cairn
#

where Fw is the force from the winch of the RopeConstraint

#

and Ff is the force from the LinearVelocity or "fish"

#

theta is the angle of the RopeConstraint

#

pretty sure theta would be:

local diffY = Pointer.Position.Y - Device.Position.Y
local diffXZ = (Vector2.new(Pointer.Position.X, Pointer.Position.Z) - Vector2.new(Device.Position.X, Device.Position.Z)).Magnitude
local angle = math.abs(math.atan2(diffY, diffXZ)) --angle between two points: atan2(yb - ya, xb - xa)
#

Pointer is the bobber (in the water), the part with both forces acting on it

#

and Device is the end of the rod (near the character)

fathom blade
#

@tranquil cairn more specific use case pl0x

#

oh i didnt see

#

its for feesh

tranquil cairn
#

feesh indeed

delicate turtle
#

theta doesnt even matter

tranquil cairn
delicate turtle
#

since its relative to the tension

delicate turtle
#

its parallel to the tension

#

just get the sum of force parallel

tranquil cairn
#

yeah but that's something I have to derive myself

fathom blade
#

get rope length, get rope stretchy amount before no more stretch, that is ur window, then calculate percent

#

ezpz

delicate turtle
tranquil cairn
fathom blade
#

it shouldnt have to

#

it doesnt need to change

#

also you can manually replicate no?

tranquil cairn
#

it is changing

tranquil cairn
fathom blade
#

then calculate it again

delicate turtle
#

T +Fw - F_F

fathom blade
#

why is it changing

tranquil cairn
fathom blade
#

its a window

#

window move

#

its ok

#

just keep calc window

#

ezpz

tranquil cairn
#

i have to deliver this POC today, im stressing

fathom blade
#

blud is not listening

delicate turtle
#

POC?

fathom blade
#

you dont appreciate the window

#

person of color

#

he sells slaves

delicate turtle
#

bruh

oblique egret
#

just wondering

fathom blade
#

proof of concept

oblique egret
#

why do you need to know the tension force

#

is it for a meter of some kind

fathom blade
#

2 businessy words for you haze

tranquil cairn
fathom blade
#

proof of concept POC

#

and minimum viable product MVP

delicate turtle
#

ok lol

elfin anvil
#

yo

#

thought we were talking about tension

#

whats going on

fathom blade
#

i feel tension now that youre here

delicate turtle
#

im telling him theta doesnt even matter

fathom blade
#

@tranquil cairn is the tension an indicator for line break or does it have other effect

delicate turtle
#

well it does bc u did it relative

#

nvm

tranquil cairn
fathom blade
#

you guys are overcomplicated ts wtf

delicate turtle
#

its 3d?

tranquil cairn
#

2D

delicate turtle
#

oh 2d

fathom blade
#

bro

oblique egret
#

what

fathom blade
#

just measure the difference and choose a window

#

distance

#

ill draw

#

1 has slack, no tension

#

2 is taught, but no stretch, min tension

#

3 is streched to max, max tension

#

you set a window on 2 and 3

#

and measure a percent to calculate a tension value

#

then its all application code

#

does that make sense

tranquil cairn
#

that was the original idea, but I haven't been able to pin down that length there's too much noise

fathom blade
#

what do you mean pin it down

#

you set it

tranquil cairn
#

the first of which is the replication of the RopeConstraint.Length

#

I;m using an unrelaible to replicate is

fathom blade
#

doesnt the client handle that anyways?

tranquil cairn
#

so noise from latency

fathom blade
#

you just need to keep track of sim on server and do sanity checks

tranquil cairn
#

no, I need to handle it on the server

fathom blade
#

but I mean why are you replicating

tranquil cairn
#

because of how these goons have this set up

tranquil cairn
fathom blade
#

why dont you just do it all on the server

errant ginkgo
#

ugh physics

fathom blade
#

client can be visual mostly

tranquil cairn
#

so the actual sim is on the client for the winch

fathom blade
#

wadafuck

tranquil cairn
#

even if it's enabled on the server

fathom blade
#

so change it

#

lmao

tranquil cairn
#

it's too late for that

fathom blade
#

so what you are having the client tell the server how the rope is doing?

#

wtf

#

why is it too late

oblique egret
#

that feels unsafe

fathom blade
#

its not too late

tranquil cairn
#

I gave them an estimate for today

fathom blade
#

its an easy switch tho'

tranquil cairn
#

and they dont know how this shit works

fathom blade
#

on equip just spawn it

#

on unequip despawn it

#

then you can have server sim

#

cant be that gnarly to do

#

and it solves ur problems

#

right

tranquil cairn
#

I just know it's going to break a bunch of other shit

fathom blade
#

what else does the winch interact with

tranquil cairn
#

that wouldnt only be moving the winch

fathom blade
#

is the player immobile during fishing?

tranquil cairn
fathom blade
#

while its in the water too?

#

or just cast

tranquil cairn
#

just cast

fathom blade
#

that makes things harder

tranquil cairn
#

look at this shit

fathom blade
#

blud is solving the 3 body problem for fish to get robux simulator

tranquil cairn
fathom blade
#

so, the physics are still replicated yeah

tranquil cairn
#

not the constraints themselves

fathom blade
#

so you can calculate tension based on velocity changes due to the ropes bonce propery

fathom blade
tranquil cairn
#

only how they interact with parts

fathom blade
#

yes

fathom blade
#

so serverside you can keep a constant of the ropes properties that dont change

#

that shouldnt change

#

then use those and the velocity changes of the fish

#

to calculate tension

tranquil cairn
#

everything about the rope changes except for the pretty much

fathom blade
#

but you have to factor fish behavior

#

how does the fish work

#

does it swim arond

tranquil cairn
#

yeah, wait a certain amount of time, apply a LinearVelocity in an 2D direction XZ

fathom blade
#

serverside or client

tranquil cairn
#

wait more, then again

#

server

fathom blade
#

good

#

so any changes that deviate you can attribute to rope

#

then you can make your own virtual tension that feels good for the game

#

does that make sense

#

the math doesnt matter, just get a delta and balance

tranquil cairn
#

that was the idea here:

fathom blade
#

didnt work?

tranquil cairn
#

yeah it makes sense, but the math matters a little, because of possible edge cases

#

and the actual math is a bit over my head

fathom blade
#

the math doesnt matter at all

#

edge cases like the fish hitting the lake border should just be squished

tranquil cairn
#

as long as it comes out to a linear function yeah

fathom blade
#

in fish behavior

tranquil cairn
#

I just dont want to end up with a concave function

fathom blade
#

you could also not base it on force at all

tranquil cairn
#

I was thinking time

fathom blade
#

you could base it on angle change from original path

tranquil cairn
#

that would be pretty easy

fathom blade
#

time?

#

just a timer

#

cringe!

tranquil cairn
#

yeah that would suck

fathom blade
#

angle change is decent I think

#

cause if the fish is going towards you

#

less tension

#

away more

#

and it balances naturally

tranquil cairn
#

hmm that could work

#

but my brain is fried

fathom blade
#

imagine a circle

#

also

#

does ur fish have a Y axis

tranquil cairn
#

no

fathom blade
#

good

tranquil cairn
#

it doesnt pull on the Y

fathom blade
#

yeah just calculate an angle

#

and then subtract

#

however many degrees different it is apply tension

#

then playtest it and see what feels good

#

thats good enough for POC

#

you can make it better later

tranquil cairn
#

different from what though

fathom blade
#

different from the fish's movement

#

so, when the fish is moving, then you check tension

#

when it isnt, you can default to no tension

tranquil cairn
#

yeah I'm only checking when it's pulling

fathom blade
#

when its pulling?

#

the fish/

#

?

tranquil cairn
#

moving

#

yeah

fathom blade
#

ah

#

yeah otherwise apply 0 tension

elfin anvil
#

ok

#

im back

#

do we still need help

fathom blade
#

@tranquil cairn

#

1 is max tension

#

2 is 0.5x tension

#

thats linear

#

you may want to alter the formula, but thats the basics

#

arrow is fish movement direction

elfin anvil
#

what the

tranquil cairn
#

I'm just trying to figure out a formula for it

elfin anvil
#

i gotchu jcx

fathom blade
#

just make anything

#

and playtest it

elfin anvil
#

theres a vid i rmbrw

#

i watched

fathom blade
#

then you will know how to make formula

elfin anvil
#

5 minutes

#

gives u formula

#

and snapping point

tranquil cairn
#

bet

#

will try in the meantime

#

thanks bluds

fathom blade
#

linear might be good enough

#

yw

elfin anvil
tranquil cairn
#

that's just to stop the fish from moving

fathom blade
elfin anvil
#

bro u can infer ok

#

mb

delicate turtle
#

i am taking ap physics c mechanics

#

like if you want

#

format this into a whole frq question

#

ill derive everything for you

#

I tink

tranquil cairn
delicate turtle
#

also do u still need help?

#

ask chat gpt for this

#

dont ask it to code it

#

ask it to derive the equation

#

and ill fact check it

#

im too lazy to frikin do it rn

tranquil cairn
delicate turtle
tranquil cairn
#

fact check the one i did?

delicate turtle
#

well idk ur steps on how u derived it

#

its just a bunch of code

#

can i see ur work on paper

tranquil cairn
#

didnt do any

delicate turtle
#

nvm im js wasitng ur time 💀

#

then we r cooked

tranquil cairn
#

@delicate turtle @fathom blade @elfin anvil

elfin anvil
#

😭

fathom blade
#

HELL YEAH'

delicate turtle
#

W