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"

Continuous Overlaping with multiple actors

I am looking for solution for continuous collision(overlaping) for multiple objects. In my application i use many block which every have it's own temperature, I mix them, put in one container etc and i want to transfer heat between them. Each block have collision sphere and when it overlap it start to transfer heat but i dont know how to handle overlaping with multiple blocks continously.

If it overlap with only block it is quite easy, i use OnComponentBeginOverlap and OnComponentEndOverlap i each i set value of bool isOverlaping variable. After that in Tick function i check: if(isOverlaping) {heat()};

But it not works for multiple objects, because some objects turn in variable true and another turn off...

Product Version: Not Selected
Tags:
more ▼

asked Dec 06 '14 at 06:05 PM in C++ Programming

avatar image

Xender
48 12 17 26

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

1 answer: sort voted first

The first thing you can try is instead of just using a boolean variable is to use an integer. In each begin overlap, add one to it and in each end overlap, subtract one. Then you can use the count to know how many other objects you're overlapping at any given time.

If that doesn't handle what you need, you could make an array of objects instead of the integer and add/remove from the array to give you a list of everyone you're currently overlapping.

Either way you can also add some filtering if there's only certain classes of objects you care about overlapping, just make sure if you make any checks like this in begin overlap, your end overlap uses identical logic or you'll get out of sync.

more ▼

answered Jan 13 '15 at 01:58 AM

avatar image

Furroy
696 26 86 62

(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