Changing gravity based on trace hit

Well, i do own that plugin and i tried to look into that. But i don’t really understand understand c++ a 100% think you could help me with that?