ProjectBorealis / PBCharacterMovement

HL2-style, classic FPS movement for Unreal Engine implemented in C++

Home Page:https://www.projectborealis.com/movement

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Questions about scalings and values

HaraldQuake opened this issue · comments

Hi.
Yesterday I set up my own UE4 project using your PBCharacterMovement. I tested it and it works. My goal is to recreate Half-Life 1: Adrenaline Gamer movement in my project. I am using HammUEr to bring my own HL1 maps into UE4. Can somebody explain how to translate HL1 scalings and values to the UE4 PBCharacterMovement project?
On this GitHub page you recommend using HL2 gravity settings for PBCharacterMovement projects.
From what I know HL2 uses sv_gravity 600 and HL1 uses sv_gravity 800. What formula do I have to use to convert these values (convert sv_gravity 600 to Default Gravity Z = -1143)?
And I have another similar question: When I import my Source Engine maps into UE4 using HammUEr, what import scale factor do I have to use to make my imported map the right size to use inside my UE4 PBCharacterMovement project? I want to have the same scaling in my UE4 project just like in HL2/Source. On your website says 450 Hammer units = 857.25 Unreal units (multiply by 1.905). What do you mean by Unreal units? From what I've seen Unreal uses cm as it's default unit. How can I convert 1 Hammer Unit to centimeters or meters? How do I have to convert acceleration values (like sv_gravity 800) and how do I have to convert plain scalings like Hammer units to UE4?
Also is the PBCharacterMovement dependent on frames per second or is it independent? What can I change in the code to make it fps dependent or independent?
Greetings!

(Edit: Added question about fps dependency. Sorry for so many questions in one topic. Hope somebody can help me...)

commented

Use 100/1.905 scale factor in HammUEr (52.49). Like you discovered, the conversion factor is 1.905 from Hammer units to the default Unreal unit of cm, because a Hammer unit is 1/16 foot. Pretty much all distance units in Source are Hu. So you can assume gravity is 60Hu/s. There are exceptions to this rule when it comes to interactions with the Havok physics engine, due to the internal conversion factor the engine uses. Using a series of mathematical proofs, you can determine the conversion factor there, but let me know if you need to know about that. It's only really useful for gravity gun conversions and physics traps.

PB Character Movement is mostly FPS independent, but there is one issue that is fixed in our internal version not released yet that affects friction at framerates below 60.

Thank you for your quick reply! Will do some testing :)

commented

I can confirm that we have ported over our friction fix for framerates below 60.