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"

How to make attached components not collide with each other?

So I'm basically making a game like space engineers, where you can place blocks in a grid on a space ship. So the ship is an actor, and the different blocks are scene components added to the actor from within the ship actor's event graph.

The issue is, when I have multiple things attached, some blocks collide with other blocks in the same ship. Like if a character was holding a sword and the sword is colliding with the character's hand, pushing the actor flying.

I tried doing this by setting the collision channel to ignore itself, but then different ships wouldn't collide with one another.

Basically I want the whole ship to act as one physics body, not collide with itself, and collide with other ships.

alt text

Product Version: UE 4.16
Tags:
screenshot-1.png (28.6 kB)
more ▼

asked Oct 26 '17 at 09:44 PM in Blueprint Scripting

avatar image

MichaelEvans
1 3 2 4

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

2 answers: sort voted first

I think I've figured out what to do, I made them not collide with each other and just overlap, but then if the ship runs into another ship I'll do the calculations my self for the physics, it'll probably be easier that way anyway. Thank you for your help though

more ▼

answered Oct 30 '17 at 12:44 AM

avatar image

MichaelEvans
1 3 2 4

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

I don't know what is Add Reactor function, but have you tried AttachToComponent/AttachToActor?

more ▼

answered Oct 27 '17 at 02:05 AM

avatar image

Flash7
839 9 17 29

avatar image MichaelEvans Oct 27 '17 at 02:20 AM

The Add Reactor adding a scene component which extends static mesh component.

avatar image Flash7 Oct 27 '17 at 02:22 AM

can you post a screenshot of it?

avatar image MichaelEvans Oct 27 '17 at 05:39 PM

both from the reactor class, it extends static mesh component Right now I have temporarily made it so that it won't collide with other ship blocks.

alt text

alt text

alt text

The third one is the call inside of the ship actor class, I attach it to the ship core, which is a static mesh component with simulate physics enabled

screenshot-2.png (152.0 kB)
screenshot-3.png (45.7 kB)
screenshot-4.png (71.7 kB)
avatar image Flash7 Oct 27 '17 at 07:03 PM
avatar image MichaelEvans Oct 28 '17 at 04:50 AM

Hmmmm, what about when the ship isn't moving?

avatar image Flash7 Oct 28 '17 at 03:16 PM

Try to see if it works. If no moving then no collision, right?

(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