Physics handle interpolation time

I’m working on a physics handle feature I had working in UE3, and everything is fine, but I see that there an interpolation time variable added to the physics handle code. Unfortunately the task I’m working on requires the handle to update it’s position instantaneously - I’ve tried putting a huge number in for interpolation but because of the way it is coded it seems to always take a frame to arrive at the new destination. I’ve taken a look at the source code and see how I might fix it (basically comment out the interpolation) but it seems to me a relatively drastic measure to recompile the engine and branch off the main version for such a small fix. Any advice?

I am having the same problem and recompiling is not really an option for me since I have little programming experience. Did you find a solution?

Have you check out Physics substepping?

Maybe this will be helpful =)

Just use SetActorRelativeLocation node and interpolate between Pickup and Handle locations right before you grab the component.

Are you trying to get a loose effect on your physics handle? I believe there is an interpolation time value on the physics handle. Maybe try manipulating that (Lower it around 10).

I solved it by creating my own PhysicsHandleComponent in C++.

I basically created a new class based on SceneComponent, copied the code from Epic’s Physics Handle from github, removed the interpolation and instead set the KinActor’s Location to that of MyPhysicsHandleComponent. Then I changed the PxD6Constraint to be locked on every axis instead of being free on every axis and using the Position/Rotation Drive. Then I check if I the grabbed component reached the right location every frame. If it didn’t, I am switching back to the Position/Rotation Drive, because we must have hit a static object, and we don’t want to try to go through that static object. Once the Position/Rotation Drive moved the grabbed object back to the Handle Location, I am switching back to locking the axis.

To use PhysX code, check out Rama’s tutorial for that on the wiki.