Understanding PhysFalling and PhysCustom

Hello,

**Q.: Can anyone explain to me how the movement physics (particularly the falling physics) act? **

I’ve edited the PhysFalling function in my own custom physics mode and attempted to extend it in order to understand how I can build my own physics correctly, but all edits I’ve done are seemingly disregarded, the only reason why I know they are actually ran is because I’ve set breakpoints to make sure they are running correctly from the PhysCustom calls.

The PhysFalling method itself is large and confusing, and I can’t find any documentation on how the forces act here. Deleting the whole code and building physics from scratch doesn’t seem like a good idea without understanding what is going on, so I tried copying and editing the PhysFalling mechanics but nothing I do seems to be working as I want it.

I’m using C++ for this but everything and in any language, no matter how small of a tip or hint, is very appreciated!

Thank you for your help,
Nitsuki

I’ve been dissecting this piece of code as well and it might be of some help if we could know what it is you want to do and what problem you are facing.

If you make your own Custom Physics mode then I think you need to set it with StartNewPhysics() after you’ve switched the MovementMode to your custom PhysMode.

If you are overriding PhysFalling and want to modify velocity you should be able to tweak velocity as you see fit and set it right around the part where they calculate their velocity, probably after or rewrite how they calculate velocity. Depends on what you are trying to do.

If you happen to have more insight then I please let me know as I’m trying to figure things out myself.