Hi, I’m creating a tornado in my game using Unreal Engine 5.4, but I’m struggling to implement an attraction force. I’m trying to make a system where, when a sphere collision overlaps with an actor or object, that object (or actor) is pulled toward the attractor actor’s location, simulating a “magnetic attraction” effect. However, I can’t get it to work. Any idea?
So you are not using niagara for it. You want some actor to behave like it is pulled.
So this is how i would do it:
- get vector of where Actor needs to go.
- now either AddForce, or use thruster component, or use FloatinPAwnMovement (but its for pawn so not sure if you want to use it).
Lets use AddForce. This is what you need (well for hovering), but for your case you need calculate force differently and use different force direction)
Hey there @porouskate9705! Welcome to the community! Nawrot’s method is correct, especially if you require more fine control over your attraction. However, if you just need a radial attractor without caring about how much control you’d need, you could just create a RadialImpulse
then fire that when you need to attract objects. You can even change which collision groups will be attracted. Just need to set the impulse force to negatives and figure out when you want to apply it.
This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.