Download

Physics objects not working if there's two of them

Hey guys,

I’m a straight up newbie when it comes to Unreal Engine, and game development in general. Have a history with Blender however, so I understand some of the technical junk with physics and whatnot. In that regard, physics in UE are destroying me right now.

Long story short - want to make a puzzle FPS that involves switching up gravity in order to pass each level - think a bit of spiritual influence to Portal’s Companion Cubes, except your character is not affected by the gravity - only the physics objects. As it stands, here’s what the overly simple blueprint for the cubes looks like:

99978a585ba8070a2d1f7b1bfc08030fb3f1f47f.png

Pretty straightforward. Gravity for cubes is disabled, physics are still enabled. At the start, the object is given the ability to receive input. There’s a vector for gravity. Pressing Q or E changes the direction of the pseudo-gravity vector. This vector is then added to an impulse that fires on every tick in order to simulate gravity. (I know there’s an issue with framerates with this method, this is just to test out the idea with the game)

Here’s the problem, however. Any time there are more than one of these objects, only the NEWEST object will work. I.E., We have gravityCube1 and gravityCube2. Only gravityCube2 will work. gravityCube1 is still a physics object, and can still be affected by the player/projectiles, but won’t react to the pseudo gravity, other than the initial setting to the negative gravity. As in, the first cube will still TAKE the original setting of the Gravity Rate vector in the photo, but won’t change vectors like the newer one will. If we have 100 cubes, only gravityCube100 will work. Not 1 through 99.

I’m just wondering how to fix this or bypass this. Again, I’m a newbie - any thorough explanation as to how/why it’s doing this would be greatly appreciated. Thanks in advance.

Snag a bump? Been pulling an allnighter trying to figure out why the other physics object doesn’t work - they’re perfect duplicates. Don’t know why one would work and the other wouldn’t. Any help, even suggestions pointing me to a potential fix would be much appreciated. Feel like I’m missing something directly in front of my face rn.

Bump… Please, anybody? This is the one flippin’ thing I can’t get to work in the game right now. Everything else I’ve programmed is working perfectly fine, just this one is the problem. Any duplicated physics object causes only one of the copies to work. Is there any fix for that? I’ve tried to rebuild the programming for it a dozen times over, a dozen different methods, and the problem still persists.