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.
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?
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.
I don’t know if it’s a little too late, but for everyone who’s wandering, keep in mind that the hierarchy transform calculations do not work whenever a primitive component has enabled the “Simulate Physics” option. This means that now the object will follow the physical simulation, so any transformation will be 100% driven by it.
You could use the physics functions that come with Unreal. I think “Add Force” is the one that will work for you in this case.