Creating magnetic effect and cutting holes through meshes

I’m trying to create a sphere shape with a magnetic effect. It should suck objects in and also the objects should fall through it.

As an example i’ve found this one Hollo Ball - Gameplay Trailer (iOS) - YouTube .

Any tips for a beginner on how to do this ? Especially the cutting holes part since it would need to cut a hole through a mesh and change its collission for that round section so objects can fall through it.

About visual:

You should not try to cut the mesh. The best way to do it is using material to not render it where your hole is. I can’t help you on that sorry.

About Magnetic effect:

In your exemple I think the ways to do it is:
- Create an actor with a Sphere Collision (the hole).
- When a cube overlap your sphere:
- In tick Move the cube toward the center of the Sphere. (+ move the cube to the bottom)

The thing in your vid may just be a 2d plane with a shader to make the illusion of a hole. Shrinking the meshes can make them appear like they’re falling.

However I made a mini tutorial of a different method that could help. UE4: Custom Depth Mask For a Crack in the Floor. - YouTube

It may look fine to just turn off collisions altogether when stuff reaches the hole.

You might be right about the shader part. I’ll take a look at your vid thanks!

About the hole and the fake falling…The thing is you cant actually turn off collision of the object that should fall through the hole because it wouldnt create the same effect. It would fall straight down.

From what you’re telling me i assume i’d need to make some sort of magnetic effect to suck items to the center and resize them based on distance from the center right (I’ve thought about the resize part), but how can i do that?

I followed a magnetism tutorial (UE4 How to make Magnets using Physics Constraints in Unreal Engine 4 Tutorial - YouTube) however i’m having some issues with it. It works at first, but after the object gets attracted and you let it go it it wont attract again (its like the magnetism gets turned off after the first overlap). Also how would i get the distance from the center to be able to resize them based on that ?

Any tutorial that you could share perhaps?

Thanks!

I’d make a collection parameter to hold the location of the hole and use world position offset in all the blocks to shrink them. World Position Offset Effects | Live Training | Unreal Engine - YouTube

The closest tutorial to magnitism I’ve watched is this is a homing system tutorial. Im not sure how relevant it is though because it uses a projectile movement component and idk how well that works on stuff rolling across a surface.

The fake falling method you’d leave collisions on and shink the mesh. if you made the hole with the method in my tutorial turning off collisions may work. So long as that magnetic force keeps pulling the object to the center, since it won’t bounce off walls anymore. But you wouldnt shrink the mesh with the second method.