x

Search in
Sort by:

Question Status:

Search help

  • Simple searches use one or more words. Separate the words with spaces (cat dog) to search cat,dog or both. Separate the words with plus signs (cat +dog) to search for items that may contain cat but must contain dog.
  • You can further refine your search on the search results page, where you can search by keywords, author, topic. These can be combined with each other. Examples
    • cat dog --matches anything with cat,dog or both
    • cat +dog --searches for cat +dog where dog is a mandatory term
    • cat -dog -- searches for cat excluding any result containing dog
    • [cats] —will restrict your search to results with topic named "cats"
    • [cats] [dogs] —will restrict your search to results with both topics, "cats", and "dogs"

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?

Product Version: Not Selected
Tags:
more ▼

asked Apr 03 '14 at 03:32 AM in Blueprint Scripting

avatar image

James Steininger
126 12 26 30

avatar image AllJonasNeeds Aug 25 '15 at 08:15 AM

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?

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

4 answers: sort voted first

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.

more ▼

answered Jun 12 '16 at 07:27 PM

avatar image

AllJonasNeeds
249 26 36 71

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

Have you check out Physics substepping?

https://www.unrealengine.com/blog/physics-sub-stepping

Maybe this will be helpful =)

more ▼

answered Aug 25 '15 at 10:33 AM

avatar image

Devero
2.3k 114 62 234

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

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

alt text

more ▼

answered Dec 28 '15 at 09:53 PM

avatar image

itisbuzz
1 1 2 3

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

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).

more ▼

answered Jun 12 '16 at 07:18 PM

avatar image

LostScout
135 18 28 36

(comments are locked)
10|2000 characters needed characters left
Viewable by all users
Your answer
toggle preview:

Up to 5 attachments (including images) can be used with a maximum of 5.2 MB each and 5.2 MB total.

Follow this question

Once you sign in you will be able to subscribe for any updates here

Answers to this question