Increasing SphereCollision Radius doesn't "push away" adjacent physics objects

It does displace the other physics objects, but does not push them (ie. the energy is converted into momentum away from the SphereCollision).

A real world example: Imagine if you had a deflated balloon on a table with ping-pong balls around it. When you inflate the balloon, it pushes the balls away. The faster you inflate, the faster they are pushed away and the more momentum they have as they roll away.

This was easy to set up in Unity, and UE uses the same PhysX engine so I’m wondering why it’s not working. When I did it in Unity, I expanded the mesh (instead of using a SphereCollision) and it worked with the mesh’s collision box.

I first tried that in UE, and it didn’t work. I then tried using a Sphere Collision as well. As mentioned, it does DISPLACE the objects. That is to say, if I blow up a balloon really fast, the ping-pong balls move to the edge of the expanded balloon, but they don’t roll beyond that. They simply move out and stop, with zero momentum.

(Addendum: I set the sphere collision by using “Set Sphere Radius” of the Sphere Collision in BluePrints, using controller input (trigger values) to set its size.)

I did try using a RadialForce as well, expanding that in an attempt to push away adjacent objects, but it also did not work.

I’ve also set up my physics to run at the highest resolution possible. Visuals aren’t a concern but physics accuracy is, in this project.

I’ve tried everything to the point where I believe there is a bug in UE’s implementation of PhysX 3.3. But I’d like to see if there are possible solutions before submitting it as a bug. Thanks in advance for any insight!

(Also, I want nothing more than to finish this project and do all of my projects in UE, in no way am I pumping the tires of Unity here, heh. It’s great but I’m in love with Blueprints and UE’s other aspects that I can’t go to any other engine at this point!)


how are you implementing the expansion of the sphere?

Expanding spheres inside a game engine doesn’t have the logical effect you’d expect.

What the game engine does is that when it expands the sphere, it doesn’t take into account any assets that might be “Pushed Away”. It will continue to grow and “Overlap” actors and meshes rather than applying the expected effect.

Thankfully this can completed using a simple equation. When your growing sphere overlaps an actor, filter out any actors you’d like to physically push via Tags, and then use the “Unscaled Radius” of the sphere to move actors directly away from the radius equal to the amount the sphere grew on that tick.

Overlapped Actor > Actor has Correct tag > Move actor X Distance directly away from the sphere.

X = Amount the radius grew this tick.

This system is already automated inside of Ue4 when moving the location of actors, but not scaling. I imagine they will change this in future, but for now, you’re better off utilizing this method, or one similar.

Good question, I “Set Sphere Radius” of the Sphere Collision in BluePrints, using controller input (trigger values) to set its size.

Thanks and I’ll update the question with that info.

Sorry I am using odd terminology in my question (which is why I felt compelled to include a real life example) so I’ll own up to this misunderstanding, but the Sphere does displace the objects away from itself, but those objects don’t continue with the momentum generated.

It does “push away” up until the boundary of the expansion (I can see how my wording is a problem!), but doesn’t push them further than that. Your solution looks to address the displacement of the other objects, which is in fact already does. It’s just that those objects don’t continue outwards as they do not retain any momentum from their displacement.

There may be a better way to word this, and I’m all ears! But yeah, it does push other objects to the X amount the sphere grew, but not beyond that.

And as I said, Unity handles all of this out of the box. The ballooning sphere pushes objects away and they retain their momentum, flying away from the ballooned sphere.

Edit: I’ve attached a little hand-animated example to show what I mean. Again, sorry for the confusion.

Ahh I see. Glad they implemented that.

All I can think of is a method that I similar to my initial approach, just using the speed of the pushed objects to add momentum to them.
Sadly I haven’t had much experience with physics programming. So I can’t declare that this is an optimized method.
Literally utilizing an “Add force” node could work after collecting information on the velocity of the objects and initiating it when the sphere stops growing could work. But might not be very efficient.

Sorry for lack of a better solution.

It’s a solution nonetheless. It will take some tweaking to ensure I get it right (determining the right amount of force will take looking at the expansion of the object in the last few frames) and you’re right, it might be a bit more expensive than something that’s out of the box in the engine.

At the very least, hopefully this gets Epic to look at a possible implementation issue (perhaps a bug?). I was hoping that I was implementing something wrong but it doesn’t look to be the case.