Directional gravity walls?

Hi all, i have made a left gravity wall blueprint. This is now setup this way: When you enter the box collision the ball gets “sucked” on the wall. When the ball is “sucked” on the wall the camera rotates to the right from 0 to 90 degrees.

The problems i now have are the following: In the “on component end overlap” i set the rotation back to it’s normal position. ( back to 0 ) But this gives me the following problem.

The “set gravity enabled” node is unchecked so the ball pawn goes up in the z axis until it is on the top of the box collision, then the “set gravity enabled” node makes my player pawn move up and down constantly and makes the camera also transition between 0 and 90 degrees constantly ( it stops when i go outside of the box collision ).

That’s unfortunatly not all. When i’m “sucked” on the wall i have some weird keyboard inputs. For example the A key does not do anything at all. The D key moves the ball off the wall. The W key moves the ball forward And the S key moves the ball backward. When i’m "sucked on the wall and the camera has rotated i wan’t the A and D keys to move the ball left and right. But with the “set gravity enabled” node i can’t controll the left and right movement of the ball.

I have a feeling i’m doing this completely wrong. I’m on the third person template, using the physics ball of the rolling template. I uploaded some pictures so you can see what i did. I’m not a pro so be nice, also some blueprints would be nice so i have a visual of what you mean :slight_smile:

Thanks in advance

I have changed this blueprints a little. I have added some pictures so you know what i’m trying to create.

This is what i want to improve:

Gravity Wall Up:

  1. Smooth transitions of camera going from 0° to 180° in the roll axis.
  2. Camera movement is reversed when entering gravity wall up. ( At this point we are upside down )

Gravity Wall Left:

  1. When entering the box collision of the gravity wall left actor the ball goes up because gravity is enabled. I don’t want the ball to go up. ( i want full controll of the ball )
  2. When ball is on top of the box collision ( because the gravity is enabled ) the camera keeps transitioning between 0° and 90° back to 0° and 90° and so on and so on. ( If i leave the trigger box the camera transition stops. )
  3. I can move the ball left and right when camera has turned 90° but the ball still goes up by it’s own ( because the gravity is enabled )
  4. When i move the camera in the turn and look up axis i get some weird camera views and weird motions.
  5. As i said before, also here i want to have smooth transitions between 0° and 90° of the camera in the roll axis.

Physics ball:

  1. I have a problem with my physics ball, when i begin playing in the editor and press the backwards button of the ball movement ( Move Forward action event ), the ball goes up and does not stay on the ground for some reason. I can’t find what the problem is. Maybe you guys know some more about this.

All help is welcome, thanks in advance.

peace :slight_smile:

I wanted to add this picture. It shows what happens when i look down and press the backwards button. You might not see what’s happening but the ball is in the air on the picture. I really don’t know how to fix this.

Above is a custom gravity plugin that I have used successfully. All credit goes to its author. Its available for free and comes with demo levels that you see in the videos. Fun and easy, give it a try (+ look at demo assets to learn how to achieve what you want)

Oh my god, thank you very very much. That’s exactly what i was looking for :slight_smile:

I spoke too soon, i have downloaded the full project and when i open the CustomGravityProject.uproject it tells me to rebuild UE4Editor_CustomGravityProject.dll and UE4Editor_CustomGravityPlugin.dll Do you know how to fix this?

When i rebuild the project i get the following error:

CustomGravityProject could not be compiled. Try rebuilding from source manually. How do i fix this? Do i need to place it in my unreal projects folder or do i need to instal the Visual Studio?

I will try to install Visual Studio and check the forum for more info, maybe there’s something i’m missing.

most likely its visual studio. I believe the plugin uses some C++ code that needs to be compiled when you first open it (this plugin exists because it wasnt doable from blueprints and author did it by creating custom BP nodes in C++)

Aah ok now i understand, I will download visual studio and try to compile it using the info on the forum. Thanks for your help :slight_smile: