Stop a ball from moving

just wondering if anyone knows how to stop a ball from moving after it gets teleported to another location? i have a on component begin overlap with a sphere and when it overlaps it sets the world location to another spot but the ball keeps moving after its location gets updated so just trying to get it stop all movement after location change and it’s a component not an actor just so you guys know thanks!

what you have there is a SPHERE8 triggering a begin_overlap event. when it happens,
you take the location of a second sphere ( 7 ) and move a 3rd sphere to the position of sphrere 7.

you are not using the overlapped component or actor. Anything that overlaps with sphere 8 will cause move sphere to spere 7 location.

Your problem/question lacks a lot of context information…does sphere has physics and it falls? this question needs more context.

Good luck


1 Like

I’m using sphere 7 as a home point so to speak so when the sphere interacts with sphere 8 then it translates to spawn seven but the problem is that as it rolls to sphere 8 it continues to roll after it’s locatation updates to spawn 7 so the movement from the shoete sphere keeps going even after it moves back to its original position which is sphere 7

heres a better renamed so less confusing i just want to stop the ball from moving after it moves to the locator

What type is ‘Ball’?

PrimitiveComponent has a “Set Physics Linear Velocity” action, which you can use to set the velocity to zero. If Ball is the root component and it’s a PrimitiveComponent, you can just use that action to set the velocity to zero.

(Unless I’ve misunderstood what exactly you’re doing.)

1 Like

Sorry yeah it’s hard to explain, it’s pretty much a pool table the ball is the cue ball and when hit it rolls, obviously, and then it should reset so to speak after it goes into a hole which is the overlap, now the problem is that it’s part of a system so it’s not the root component and just a normal component in the hierarchy umm I’ve tried the velocity but doesn’t seem to stop the movement :person_shrugging:

Could you demonstrate how you’re doing it because that should work just fine. Also, how is the ball being moved in the first place? How are the forces applied?

Generally speaking simulating physics on a non-root component can lead to unexpected / confusing behaviours but can be feasible providing there’s no other way to do it.

1 Like

2022-05-24 14-07-43.mkv (2.6 MB)
it just keeps moving after

Could you demonstrate

I meant the script, could please show how, where and when you are calling Set Physics Linear Velocity on the component that simulates physics.

There isn’t one it just gets hit by the stick and rolls

I use blueprints not scripts

That exactly what we mean. Please post a screenshot of the script and describe where and when you’re calling Set Physics Linear Velocity in order to stop the ball.

I’m not usuing that function because it doesn’t work, that’s what I said previously. If that’s the only function that will so the ball then it will never work unfortunately, thanks anyways I guess

It does work. Up to you. :slight_smile: Unless you keep applying forces after stopping it that is.

If that’s the only function

You could stop simulating physics. That’d work too, but then you’d need to re-enable it, ofc.

There’s no force there is no velocity there is nothing there is nothing in the blueprint for it the only thing that makes it move is the stick contacting with the ball and making it move by that way and using unreals physics to do the rest, so i don’t know sorry I’ll just close the question

Yeah I’ll try that thanks

I wonder whether you’re having issues because the simulating component is not the root, as mentioned somewhere above.

I’ve been dealing with UE4’s physics and PhysX for years and it leads to weirdness in too many places.

Is there a good reason why the ball is not the root?

Anyhow, call these two after teleporting:

The ball has angular momentum since it’s rolling. It’s not really linear movement, at least not only. But I’d call both just in case as the simulating mesh may be bouncing around, too.

I’m trying to make it an encompassed asset, so that I can take it from one “game” to another without having to setup all the nodes everytime so to speak, making it one blueprint instead of several if that makes sense

Fair didn’t really think of doing both, I will try that thanks

1 Like