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"

AddForce on Character has different results on different machines / PIE launches

a bit of background as to what is going on:

As part of our game the movement of the PlayerCharacter is done in "bursts" in a given direction...as such we set up the following parameters for designers: Mass, PushAmount, PushTime. Using this, we "push" the PlayerCharater for PushTime seconds, for a force of Mass * PushAmount.

In order to do this, I just take the direction vector (normalized) and multiply if by Mass * PushAmount. I then set this in AddForce for the character in its EventTick. This goes on for the set PushTime (I use a boolean which is enabled / disabled by a timer set for PushTime which EventTick checks to see if it should AddForce that tick).

as debug info, I also output the distance traveled and max velocity over the distance traveled, and I have found what I think is a bug:

Depending on how I launch the game, the distance traveled and the max speed differ. For Example, when I launch the game in PIE, standalone, new Editor Window, I travel less and am slower than if I launched the game as Mobile Preview. Also, I have tested this on different machines; Depending on the machine, the distance traveled and speed varies greatly. This isn't a matter of 1 or 2 units, but almost 50~100 units at a time.

We are running UE 4.6.1 and this is currently all being done in Blueprints.

I have a hard time believing the PhysX engine is this sloppy...physics engines shouldn't be this varying...in fact it should be the opposite. Either I have not done something correctly or there is a bug, but I've checked all possible parameters I can think of and I can't see any flags that suggest "ensure PlayerCharacter's physics calculation is consistent." Or is there something I have to set in C++ that isn't exposed in Blueprints?

Any assistance would be greatly appreciated!

Product Version: Not Selected
more ▼

asked Dec 19 '14 at 06:09 AM in Using UE4

avatar image

91 4 6 9

avatar image Naters4lad Dec 19 '14 at 09:30 AM

For my final project at Uni (in UE3) we had a character controlled by adding force. We discovered through tons of research the PIE physics simulation was an "approximation" of what it would be like in the actual game. It sounds as though this might be what you're experiencing. Unfortunately we were never able to correct this in a way that would resemble the final product so we had to tweak it in a way that would be satisfactory in the final game and just deal with it in the editor. Perhaps someone with more recent experience than me could chime in and maybe speak about the differences between machines. Curious: are the machines specked the same way? (Same amount of ram, cpu, etc).

avatar image nihonnik Dec 19 '14 at 09:42 AM

This is the conclusion I'm coming to, but I really need confirmation from someone at Epic that this is the case. If so, we will use deployment packages of the game for them to do balancing.

The machines themselves are different specs, but similar. Also, as mentioned, I have differences in performance even on different launch types on the SAME machine

Anyone from Epic able to answer?

avatar image Naters4lad Dec 19 '14 at 09:53 AM

Me as well. My studio will be working with physics very soon and I'm curious to see if there is a way to get the editor to more closely resemble the final game. Good question.


avatar image nihonnik Dec 21 '14 at 09:24 AM

As an update: I tried packaging a Win64 build and running it from different computers. Unfortunately, this problem is NOT just a PIE issue -- even with Development packages, the physics engine seems to give different results per machine.

Epic, please inform us as to what the issue here is.

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

0 answers: sort voted first
Be the first one to answer this question
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