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?
asked Apr 03 '14 at 03:32 AM in Blueprint Scripting
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.
answered Jun 12 '16 at 07:27 PM
Have you check out Physics substepping?
Maybe this will be helpful =)
answered Aug 25 '15 at 10:33 AM
Just use SetActorRelativeLocation node and interpolate between Pickup and Handle locations right before you grab the component.
answered Dec 28 '15 at 09:53 PM
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).
answered Jun 12 '16 at 07:18 PM
Follow this question
Once you sign in you will be able to subscribe for any updates here