#Player being dragged down

1 messages · Page 1 of 1 (latest)

stable lynx
#

this code is in a heaartbeat event in a local script btw

stable lynx
#

@ebon ruin

median wasp
#

ummm

rain sleetBOT
#

studio** You are now Level 10! **studio

median wasp
#

ooh i'm level 10

#

lol okay

stable lynx
#

it's a mp4

#

wait isnt catbox a trusted video uploader

#

if u want i can upload it to streamable

median wasp
#

no like

#

what is this system for

stable lynx
median wasp
#

elaboration please ;-;

stable lynx
#

like in attack on titan

#

doesnt the video show

#

have you watched the video

median wasp
#

your video is like rlly crazy for some odd reason

stable lynx
limber folio
median wasp
#

okay first of all

#

what is "slide"

stable lynx
stable lynx
#

letme send u the full code

median wasp
#

does your issue relates to the character like being stuck or clipping or smth

stable lynx
#

normally if i press Q it will hook myself into the wall

#

but over time it just keep getting dragged to the ground

#

and if i release and try to hook onto the wall again the dragging process persist

median wasp
#

what do you mean by "it"

stable lynx
#

my character

median wasp
#

the dragging is downwards?

stable lynx
#

yeah toward the floor

#

my character is supposed to be on the yellow part

median wasp
#

maybee you're fighting against gravity since you're falling down while actively trying to move towards the target

median wasp
#

well that's the issue

#

hmm

stable lynx
#

if i remove that variable to problem is still the same

#

but yeah if i set the gravity to 0 the bug wont occur

median wasp
#

hmm

#

you want gravity right

stable lynx
#

how to set part's gravity to 0

#

the only method i know is to apply that linearvector

median wasp
#

no like what if

#

you have an upward force

stable lynx
#

yeah that's the purpose of the gravityslide variable

median wasp
#

also it's better if you start using vectorvelocity or assemblylinearvelocity since those are the new versions of linearvelocity

#

okay hm

stable lynx
#

theyre the same right

median wasp
#

not fully but the same goals

stable lynx
median wasp
#

hmm

#

i wanna try it for myself

stable lynx
#

the game?

rain sleetBOT
#

studio** You are now Level 6! **studio

stable lynx
#

i published it

#

u want the link?

median wasp
#

suree

stable lynx
#

oh btw somehow the dragging only happens when you get close to the orb

#

the yello part

median wasp
#

have you tried turning off ForceLimitsEnabled

stable lynx
#

whats that

median wasp
#

a property in linearvelocity

stable lynx
#

i actually dont want the force to be too big

#

cus it will fling my character

median wasp
#

there's also a MaxForce

#

i've created like a 5 minute grappling system for myself just to test out linearvelocity and those two property seems to be what's affecting the movement

stable lynx
#

o

#

ok now it doesnt drag down but my character will go crazy

#

ToT

median wasp
#

yeahh

#

ooh

#

i love testing

#

i tried using alignposition and it's something??

stable lynx
#

hm

median wasp
#

it's like tweening from what it feels like

#

you should try it

stable lynx
#

i remember this thing is used for like pets

median wasp
#

but hmm i'm not a fan of it

stable lynx
#

but like my grappler need to be able to turn

#

like hover around

#

so i dont think it will work

median wasp
#

i'm not sure what a feasible solution would be though

#

we're relying on physics based movements to move the player

stable lynx
#

yeh

median wasp
#

but we could also try using pure code

stable lynx
#

like tweening?

#

and a bunch of raycasting to check the blocked paths?

median wasp
#

maybe

stable lynx
#

dang it would be a nightmare since i have orbiting

median wasp
#

actually just keep it to physics

#

it'll look choppy without it

stable lynx
#

oh i think i get the problem

#

the value Y of my (hrp.Position - goalclone.Position).Unit

#

keep change from like -0.9 to 0.9

#

changing

#

i think i'll find a way to tween it

median wasp
#

oh yeah how did you calculate where to go

stable lynx
stable lynx
median wasp
#

okay great

#

you know what i've noticed

stable lynx
#

?

median wasp
#

i'm dragging against the floor when i'm far away from those parts

#

it's definitely a property in linearvelocity

stable lynx
#

wym

#

the same as my problem?

median wasp
#

maybe i'm not sure

stable lynx
#

hm

median wasp
#

yeah it's definitely ForceLimitsEnabled

#

you should rlly turn that off

stable lynx
#

never had that thing on tho

median wasp
#

that's what is doing that dragging movement thing

#

yeah i'm quite confused rn

median wasp
stable lynx
median wasp
#

but does it reach the target goal?

stable lynx
#

yeah it still has that problem

median wasp
#

becos i tried it it seemed to have worked

#

but yeah only when it recahes it then it starts bugging out

#

i'm thinking of anchoring the body when it reaches the target, but the movement to reaching there should be constant

stable lynx
#

the thing with my bug is that

#

let say the drag down process is 5 stud from the goal

#

and i release

#

and the next time i hook again the bug will start at that process which is 5 studs bellow the goal

median wasp
#

the dragging down issue comes from the linearvelocity not having enough force to push it

stable lynx
#

nah it happens how high the force is

#

no matter*

median wasp
#

idk abt you but for me when i changed it to a higher number it did move correctly

stable lynx
#

also linearvelocity is supposed to cancel out the gravity

#

ig

median wasp
#

i'm not sure abt ur place but it worked for me

stable lynx
#

can i see your code

median wasp
#

mass relies on force to move things

#

hmm okay wait

stable lynx
#

um but mine is like setting the velocity to face the goal every frame

#

so the character stays in place

#

in the goal i mean

median wasp
#

yeah i can see that but the whole point of it is for the body to move to the spot

stable lynx
#

in my game initial direction is correct but as you get closer to the goal it will get pulled down

median wasp
#

you just need more force

stable lynx
#

add more force makes the dragdown process happen faster lol

median wasp
#

that is totally the opposite for me what..

stable lynx
median wasp
#

why do you need to change it every frame?

stable lynx
#

hanging feature

#

like u shot 2 grappler on 2 pillars

#

then u will be able to hang in the middle

#

or just stick to the wall using 1 grappler

median wasp
#

hmm okay

#

so you have logic implemented while the person is grappling on

stable lynx
#

no

rain sleetBOT
#

studio** You are now Level 7! **studio

stable lynx
#

it's just

#

kêp pulling into the wall

#

keep

median wasp
#

do you have any ideas?

stable lynx
#

tweening doesnt help ):

#

though it does make the grappler feels smoother

median wasp
#

;-;

stable lynx
#

do you know anyone that is good at roblox physics?

median wasp
#

i've ran out of my creative juices rn

stable lynx
#

same

median wasp
#

umm not rlly

#

physics is my weakness to be honest

stable lynx
#

rip

median wasp
#

not all hope is lost tho

#

i'm not sure if ur interested but there are a handful of sources online

stable lynx
#

i read everywhere man (:

#

cant find anything that can be applied

median wasp
#

like what i would usually do in this scenario if i don't know anything is understand how other people's mechanism work

#

because that could give you an insight

stable lynx
#

can u try using heartbeat like me

#

maybe u will figure things out

#

put it in local script tho

#

nvm it's already on local script

median wasp
#

i'll try but um

#

i'm not that big of a fan of relying on other people but if you could, try to figure out the general way of making a system like this before doing your own

#

you'll need a basic understanding on how things like these are done before proceeding making it on your own

#

because from what it seems like

#

i'm still quite clueless on how your system fully works

#

and the only problem that you're facing is physics

#

you could try other methods

#

but yeah i do suggest physics since it's qute suited for things like these

stable lynx
#

yeah i tried downloading other people grapple system be4

#

but i cant understand it lol

median wasp
#

i think what i can say rn is you should try to figure out how to negate the gravity

#

because that's what is pulling you down

#

like there are non physics based ways of course right, lerping and tweenings and stuff but i'm not sure if that's the right way to do it

stable lynx
#

but it's a old version so they use bodyforce

median wasp
#

those methods are to force the position to where you want it to go

#

without relying on force

stable lynx
#

what

median wasp
#

like the only thing that is affecting it slightly could be gravity but when you're constantly updating the body's position instead of using a force to move it, it's more of code than physics

#

i'm not sure how to tackle something like this because what you're experiencing is the world pulling you down, but you already tried an upward force, and maybe adding more force to push it so idk

#

i haven't tried doing that heartbeat thing yet though

#

umm what's the heartbeat for again?

stable lynx
#

constantly updating the velocity

#

i notice something

#

like

#

my (hrp.Position - goalclone.Position).Unit has its Y value positive when it is supposed to be negative (to move upward)

#

so the linearvelocity is pulling me down, not the gravity ToT

stable lynx
#

idk how to fix that tho

median wasp
#

that doesn't make sense

#

positive is to go up, negative is to go down

stable lynx
#

wym

#

no when i hook the sky to go up it prints negative

#

and when go down it prints positive

median wasp
#

oh the direction

stable lynx
#

yeah

median wasp
#

i'm not sure about you but

#

which axis is supposed to be negative?

stable lynx
#

Y axis?

#

to go up

median wasp
#

but for some reason

#

my y is always positive whenever i'm going up

#

and negative when i'm going down

#

what ;-;

stable lynx
#

it's my (hrp.Position - goalclone.Position).Unit

#

so if the goal's Y is higher than my hrp's Y it should return negative ifyou minus

#

in order to go up

median wasp
#

what if you swap both places

#

because i have target - hrp

stable lynx
#

yeah then it's gonna be positive when you go up

#

i think i found the bug

#

letme try to lock in rq

stable lynx
#

om problem fix