Blueprint/C++ Advanced Templates , Tools & Plugins

Maybe this is already asked, but what is the license on this?

Can this be used commercially?

Thank you so much for the plugin. I’ve been looking for something to help manage custom gravity for a while without having to dive into the C++ myself. I am also curious what license this is released under.

You can use it as you wish , like all the works I’ve done before , it’s free of charge without any obligation.
Maybe I have to add a licence note to it.

Problem with rotation

Hey there,

Firstly, thank you very much for this plug-in, it’s pretty bad ***.

I’m using the sphere gravity into a project where you’re an eagle : so you’re flying around the sphere. The problem is that it creates problems with my character rotation.

It works well on one part of the sphere but while i’m moving, even straight forward, there’s a force that rotates my character. So it does not behave like in your first person character example (pitch and yaw updated and roll locked ) 'cause there’s the roll in addition of this (so pitch, yaw and roll updated).

Do you have an idea of how to modify this?

blimey thats ace!

thanks for sharing it :slight_smile:

In this project , the capsule rotation is always calculated based on gravity direction , for other roations , I rotate the mesh or the SpringArm.
For what you need to control roll?

I fly like a jet plane so I roll went I turn etc

Hello, I am wondering if there is a “Force gravity update” or something like that. I am playing the gravity room map and it only updates my new gravity direction once i hit the ground, which means I have to wait to land even if I changed gravity before that.

Btw this is amazing!

For that i dont think you need this plugin , you can use a Pawn + FloatingMovementComponenet and apply a force (UseAccel checked) each frame to your collision component (Simulate Physics setted to true , Enable Gravity Setted to false)

Force = Direction * GravityPower ;
Direction = From Pawn to Planet Centre (Nomalized)
GravityPower = ex. 980

Yes , thanks I will try to fix that soon

Hi! I’m trying to add a customGravityComponent to my character and afterwards changing its direction with a vector lets say (1,0,0) so the character should “fall” to the sides, right?. But if I log the current gravity direction it doesnt change at all…What Am I missing? (I’m not an expert in UE4 so it might be a silly question)

You can add “CustomGravityComponent” only to Physics Objects (Character class already have a MovementComponent).
For something like character you should use CustomPawn derived classes

Thank you very much! The problem was indeed that I was not using your CustomPawn…Good job with the work (:
By the way…If I set the gravity of the room to 0 (GravityRoomMap) the meshes works fine but the CustomPawn does not give a ****… If u lift the playerStartPoint, he falls down like normal gravity, plus you can not jump once in the floor :frowning:
Just again, its probably me not doing something right.

Still sick work man, keep it up.

very nice, thanks for your work.

Hello Mhousse1247 and all, this plugin looks sweet!

I’m new to plugins and when I downloaded the files I get an error when I tried to open the uproject file:

“The following modules are missing or built with a different engine versions: UE4 Editor - CustomGravityProject.dll
Would you like to rebuild them now?”

I click yes and I get another window that says:

“CustomGravityProject could not be compiled. Try rebuilding from the source manually.”

I downloaded the GitHub files as a ZIP folder and extracted them to my desktop. Am I forgetting to do something?

Thank you for your help with this :slight_smile:

You can compile it with visual studio

Thanks for the quick response, when I tried to generate the visual studio project files I got this error:

Running C:/Program Files/Epic Games/4.9/Engine/Binaries/DotNET/UnrealBuildTool.exe -projectfiles -project=“C:/Users/100528271/Desktop/UE4-CustomGravityPlugin-master/UE4-CustomGravityPlugin-master/CustomGravityProject.uproject” -game -rocket -progress
Discovering modules, targets and source code for game…
Errors detected while compiling C:\Users\100528271\Desktop\UE4-CustomGravityPlugin-master\UE4-CustomGravityPlugin-master\Intermediate\Build\BuildRules\CustomGravityProjectModuleRules.dll:
c:\Users\100528271\Desktop\UE4-CustomGravityPlugin-master\UE4-CustomGravityPlugin-master\Plugins\CustomGravityPlugin\Source\CustomGravityPlugin\CustomGravityPlugin.Build.cs(5,14) : error CS0101: The namespace ‘<global namespace>’ already contains a definition for ‘CustomGravityPlugin’
ERROR: UnrealBuildTool encountered an error while compiling source files.

What would be the next step to solve this?

Thanks for help! :slight_smile:

what version of the engine are you using?

Currently I’m using 4.9.2.

delete this project and extract the project again , and then Generate visual studio files