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"

AddActorWorldOffset fails with physics enabled

I've stumbled on an interesting issue that may just be due to inexperience, but may also be an issue with the AddActorWorldOffset node.

I have a falling bomb type object in my project (no movement component, inherits some velocity from its parent when dropped via impulse and is affected by gravity only). I've also got a box that I'm using to simulate wind on the bombs as they fall by using an AddActorWorldOffset node on when the bomb overlaps the box. Idea being that as the bomb falls, the wind can push it back and forth a bit.

My problem is that the AddOffset meant to simulate wind only moves the bombs when they are kinematic. IE, when I enable physics so that they fall properly, no offset is added at all (regardless that the AddActorWorldOffset node in question does fire in the BP and looks the same with the object kinematic or physics enabled).

I've tried reducing the mass of the object to .01 kg, increasing my wind force as much as 5x, and using the AddActorLocalOffset and have seen no difference with physics enabled. But, as soon as physics is off, the AddOffset does as intended.

I've attached the section of the BP for the Wind Box that applies the force. alt text

Product Version: UE 4.11
Tags:
applywind.png (301.6 kB)
more ▼

asked May 09 '16 at 07:48 PM in Blueprint Scripting

avatar image

Raistlin-
105 5 7 15

avatar image Raistlin- May 11 '16 at 07:38 PM

After some experimentation I found that when the physics are enabled on my bomb object the root component is affected by the AddOffset as intended, but the root is the ONLY component affected. I thought that any component that's a child of the root was supposed to be attached to the root and affected in the same way. Am I wrong, or do I just need to put logic in somehow to ensure that the sprite is attached to the root component?

avatar image Raistlin- May 12 '16 at 01:58 AM

Not sure where to go from here. Found that no attach logic to make sure the 2 components moved together was useful. While looking about in the Details panel I noted that while running PIE, I could hit the check box under Physics for "Should Update Physics Volume" on either the root component or the sprite component (which is a child component of the root) and the sprite would then move to the current X position of the root and start dropping.

I'm fairly stumped. Ultimately, I have a workaround in mind, but I feel like I'm just missing something here.

(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