Physics (Bullet) Client-side prediction

How can you simulate a physics tick on a Physics Scene? I’ve digged into the code and if I’m not wrong, at the start of the game tick, the game goes to the physics scene and calls StartFrame(), and when the end of the game tick comes (or the start of the next one?), the game gets the physic scene’s completion event, a graph event, with GetCompletionEvent(), and checks if its complete, if it is, it calls EndFrame(), and if not, it attaches a delegate to it that will be called when the physics tick ends, and will call EndFrame(), if I’ve understood that right.

I am probably missing the point completely, but what I’ve tried to do is do the same thing, call StartFrame(), and then get the completion event and attach a delegate to it, which will call EndFrame(), and do it a few times to resimulate my physics, but I just get a crash that says the completion event graph event does not exist yet. This is probably because I tried to get it right after starting the frame, and not later on.

I have no idea where to look from here, any help would be greatly appreciated :slight_smile: