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"

Saving/Loading Physics and Forces

Is there any way to easily save/load physics on an object?

For example, a ball is rolling down a hill. I save the transform of the ball.

When I load the save, the ball is in the correct spot; however, the physics are different from when the object was saved.

From what I can tell, the loading does not reset the physics of the object.

If the ball stops rolling after the save, it is still not rolling when loaded.

Is there an easy way to save the physics on an object at save time?

Right now, the only method I can think of is grabbing the forward vector at save time, stopping all forces on the object, then re-applying the force at load time.

Is this the correct/only way to do this? I could not find any tutorials on this, nor any other posts about it.

Product Version: UE 4.10
Tags:
more ▼

asked Mar 28 '16 at 07:43 PM in Blueprint Scripting

avatar image

gxtommy
0 1 1

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

1 answer: sort voted first

Where are you saving the values for the ball? You should just be able to save those values, set them as a new variable somewhere (game instance perhaps), save those and then load those.

more ▼

answered Mar 28 '16 at 07:54 PM

avatar image

VictorBurgos
2.4k 61 27 115

avatar image gxtommy Mar 28 '16 at 10:55 PM

Right now I'm saving the transform for the ball inside a custom save game blueprint. My save game blueprint is inherited from unreal's save game class. I have all the variables that I need to save within my custom save blueprint. Why would saving inside the game instance change anything?

(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