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"

How could I prevent endless collisions in a "magnetic field"?

So what I tried to do is to create a custom "magnetic field". I spawn 1300 Blueprint-Actors (in the picture: all the white bubbles) to which I apply a force towards a center point (in the picture: the big white bubble above. Grafity is also applied, thats why they "blob" below the attraction-center). Another side-note: The force is dependent on the distance from the center-point (white bubble above).

The problem is the performance - framerate drops extremely when the blob has formed.

So I tried to separate what exactly causes the huge performance drop and switched off the "magnetic force towards the center" and just let them all fall to the ground after spawning. There was no major performance drop (ofc a bit because I still spawn 1300 actors).

I have the notion that the endless collisions inside this "blob" could be the reason for the performance-problems! The bubbles move all the time because of course there is still a force applied to them.

So general question: How could I achieve a similar effect (magnet force towards a center) and reduce the amount of collisions? I tried "linear damping" which wasn't so successful. I basically want to attract all actors and want them to form a blob like that. Is there another way to achieve this or maybe a trick to improve performance?

Side question: I am not sure whether the collisions are the only problem, since it also might be, that just applying force to so many actors could be the reason, what do you think?

Thank you already very much for you help and opinion.

alt text

Product Version: Not Selected
unbenannt.png (355.3 kB)
more ▼

asked May 26 '17 at 09:24 PM in Blueprint Scripting

avatar image

6 2

(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