9 months ago

[ SOLVED] Grappling Hook with different AddForce on each scalability Settings


Hello, I would like some help to understand something that is blocking me in the progress of my student project.

Currently, in our FPS game, we use a grappling hook as a mechanic that allows us to swing and be drawn towards the direction of the point of impact.

However, I've noticed a huge problem: when the player reduces the game's parameters, the grappling hook applies a force twice or even three times less powerful.

I'd like to know if there's a solution to this problem, if we can set a fixed value in the engine physics parameters so that it doesn't change the way the game engine calculates the physics.

Solution I've already tried:

- Substepping -> True

- Max Substeps -> 4

- Use file DefaultScalability.ini in config with this config :

[/Script/Engine.PhysicsSettings]

bEnablePhysicsReplicationOptimizations=False

PhysicsSubstepping=True

MaxSubstepDeltaTime=0.016666

MaxSubsteps=4

- Do not use the tick

- Used a set timer by event with a fixed value

- Use Tick with reducing power force in relation to framerate

- Physics Prediction -> True

[Solved]

PLEASE USE AddMovementInput for that !!!!!!!!!!!!

FVector ForceDirection = (GetGrapPoint() - GetPlayerOwner()->GetActorLocation()).GetSafeNormal() * GetForceGrapple();

GetPlayerOwner()->AddMovementInput(ForceDirection, 1.0f, false);

To avoid hassle use the AddMovementInput if you apply force to the character.

The player must be in mode MODE_FLYING for it to work, you must therefore limit the speed of the fly and adjust the speed with your acceleration, and above all used the tick so that the AddMovementInput does the force calculation, and forgot to multiply your force with your FrameRate, the AddMovementInput does it for you!

This is also a very good method that works in multiplayer.



19 comments

Loading...

Next up

#MyFavoriteGame this is my favorite game 🤟

Click N Lick - Game Jam Studio Mercier 2025

https://gamejolt.com/games/ClickNLick/984740

Lynked: Banner of the Spark is a colorful action-RPG & town-builder where you and your robot buddies help build a new future from the ground up.

⚠️ The game has a free Steam Weekend from August 7 to August 11!

Try the game now: https://bit.ly/LynkedSteam

Timepod Express is now available on GameJolt! (2023)

https://gamejolt.com/games/TimepodExpress/973767

Happy #WIPWednesday! Are you working on a game? Making some art? Practicing a song? Something else? Tell us in the comments!

Elemental Arena - Dueling elements at Game Jam!

Central Computer - An immersive network terminal for The Backrooms Conundrum (WIP)

The Knightling launches on August 28! Wishlist it now so you don't miss out: https://bit.ly/KnightlingSteam

To celebrate the game's impending release, we've added The Knightling Pack and The Knightling Community Pack back to the Shop!

10 Years old ???????

#spawnday