#Apply instantaneous force to a part

1 messages · Page 1 of 1 (latest)

dim tundra
#

I'm trying to apply a force to a part. I've tried LinearVelocity and Vector force, but those are for constant forces. I've also tried ApplyImpulse as well as directly setting the part's AssemblyLinearVelocity. The result with both of those last two is that the velocity is set, but it is immediately overcome by the force of gravity.

#

Picture shows the AssemblyLinearVelocity.Y of the part for each physics step (PreSimulation)

open dagger
#

use apply impulse

dim tundra
#

"..I've also tried ApplyImpulse.."

open dagger
#

did you add enough force

#

also are you using debris service

dim tundra
#

Yes, it either goes off into space or it doesnt move at all

dim tundra
open dagger
dim tundra
#

not for that part anyway, why?

open dagger
#

depends on what youre doing

dim tundra
#

A fishing system

open dagger
#

and the hook is the thing you are applying the force to?

dim tundra
#

yeah basically

open dagger
#

ok so id suggest not using a force and instead calculating an arc and tweening it

#

use raycast to cast to a point in the ocean and tween the arc movement

#

thats what id suggest, ik its not a solution to your current issue but it would make your life easier :/

#

by raycasting you can also detect if the cast is aimed at a body of water too

dim tundra
#

Yeah i was just trying to get it to work using pure physics

open dagger
#

yeah id advise against that

#

physics + roblox = hell

dim tundra
#

I already have stuff in place for that

dim tundra
#

wild that I can't get simple physics to work

open dagger
#

use a sine wave and represent the target as 0° and your hooks initial position as 180°

#

that way you wont have to worry about gravity

dim tundra
#

yeah but then it's going to be constant

#

and will look odd

open dagger
#

wdym

#

you can change the arc depending on distance

dim tundra
#

the speed of it, if I tween it

open dagger
#

you can change the speed

#

you can also use exponential tween

dim tundra
#

I'm so bad at math, I'll try it though

open dagger
#

its alr its not a hard thing to do dw

dim tundra
#

I'm also going to need to use physics to deal with a fish pulling against a rope constraint too

open dagger
#

nah tween it

dim tundra
#

I would be rewriting everything lol

#

I've been at this for like 3 days

open dagger
#

itll be worth it bro

dim tundra
#

I need to deliver a POC of this tonight lol

open dagger
#

you can get it done im sure

graceful marsh
#

e.g to perfectly counter the force of gravity you just do -gravity*mass

dim tundra
#

When the tool is parented to a character though, the part I'm applying the impulse to just falls straight down

#

@graceful marsh @open dagger

graceful marsh
#

also i have no idea what you're trying to show there

dim tundra
#

this is just a capture of it working

#

(after applying an impulse)

graceful marsh
dim tundra
graceful marsh
#

well obviously, since the player is holding it?

#

is the player supposed to fly into the air with the fish?

#

expectations: what are they?

dim tundra
#

I expect the part at the end of the rope constraint here to have the impulse applied to it and react accordingly