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"

Office Holiday

Epic Games' offices will be on holiday from June 22nd to July 7th. During this period support will be limited. Our offices will reopen on Monday, July 8th. 

Heavy performance killing bug with physics

It appears this bug can reduce the framerate to 0fps! I'm using a physics handle for grabbing objects and throwing them. These objects consists of actors which have just simple box collisions that are welded together. So like ca 10 box actors welded together. Every time a object is grabbed again the framerate gets reduced while that object is physic simulated. First I have 90 fps, after the 30th grab I have like 10 fps. However, when the physics simulation is set off it jumps up to 90, when set on again back to 10fps.

To recreate: At runtime spawn several box actors and put them perfect close together (It is a random constellation for me) attach weld all to the first actor. On input 1: Set that first actor to be physics simulated and grab it with a physics handle. (don't forget the set target location every tick, I also set the rotation to 0 every tick since the physics handle rotation constraint does not work) On Input 2: release the actor, make a delay and set physics simulation off. At play use input 1 and input 2 several times and see the framerate dropping everytime. (I'm using no gravity on the box actors and make use of set impulse and add force after a object is released from grab. I'm also changing the collision type from vehicle to physics object and back again)

I have no idea what exactly is causing the framerate drop, maybe it even has nothing to do with physics handles nor welding collisions and it is a general physics bug.

Here is also that physics handle bugs report where I briefly mentioned this: https://answers.unrealengine.com/questions/423767/physics-handle-rotation-now-completely-broken.html Since I'm not sure if that is connected to physics handles and this is a heavy problem I made this a own post.

Product Version: UE 4.11
Tags:
more ▼

asked May 24 '16 at 07:14 PM in Bug Reports

avatar image

Davision
945 102 147 201

avatar image Adam Davis STAFF May 25 '16 at 01:57 PM

Hi Davision,

  • Does this occur in a clean, blank project with no additional content or is it limited to one project?

  • Has this occurred with any other actors or does it occur with the basic cube?

  • Can you show me a screenshot of your blueprint setup?

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

1 answer: sort voted first

Davision,

We touched on this briefly in the other post. Thought I'd post this here too just to make sure we had full coverage. It sounds like this related to an issue we've recently fixed (but that won't be released until 4.13).

The fix is pretty simple though. If you're using the source version, go to Engine\Source\Runtime\Engine\Private\PhysicsEngine\BodyInstance.cpp, at around line 2037 (in FBodyInstance::Weld).

Modify the function like so:

 bool FBodyInstance::Weld(FBodyInstance* TheirBody, const FTransform& TheirTM)
 {
     check(IsInGameThread());
     check(TheirBody);
     if (TheirBody->BodySetup.IsValid() == false)    //attach actor can be called before body has been initialized. In this case just return false
     {
         return false;
     }
 
     if (TheirBody->WeldParent == this) // The body is already welded to this component. Do nothing.
     {
         return false;
     }
 

The important bit is that second if statement (the rest should already be present).

Let me know if that resolves your frame rate issue.

Thanks, Jon N.

more ▼

answered May 27 '16 at 01:32 PM

avatar image

Machina.Widmo STAFF
179 4 4 6

avatar image Davision May 30 '16 at 05:01 PM

Thanks, I have not done anything with the source before so I rather keep working with the bug for now. If it takes too long with the 4.13 release I then try that with changing the source.

avatar image Davision Sep 27 '16 at 01:20 PM
(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