I’m sorry, but I am reposting this question with a link underneath the Bug Reports section.
I asked my question in the Discord chat under ue4-blueprints but unfortunately it was not answered. I’m starting to feel it is more a bug than a feature.
I will be attempting to move forward using a possible work-around for my current phase - however I believe my work around will cause a hindrance as I move forward.
The work around I will try to implement is simply to not position the actor where I want it, but rather do calculation in advance…or perhaps attach an actor to the component.
It is not clear what your problem is from that link.
Are you saying that the motion of the actor you are setting the transform of is lagging behind the rotation of the rotating actor by one frame? This would be because the rotating actor is ticking after the one being moved. You need to call both updates from the same place so you can control the order. Consider doing this from the level blueprint.
So what I’m trying to do is position an Actor/Object [CONE] at the transform(really location and rotation) of a component [arrow component] of a rotating Actor/Object [CUBE] which is not at the center of the object (i.e. offset by a spring arm). I did it, but if you look, the CONE object is not atop of the ‘arrow component’ in the image.
I’ll try to create another example using simple art designs rather than screen shots in a couple minutes.
Actor #2 consists of one component and is simply the Aliens.
The important part now is that the Earth is always rotating. So long as the Earth is rotating, you will see this issue (it does not need to be constant, but the problem becomes easily noticeable by constant rotation.
Here is what I would expect to happen and what I would like to happen.
Thanks again, I’ve posted an update in hopes to clarify. Let me know if you’d like me to explain it another way, or provide the steps in Unreal Engine to reproduce.
I’ve tried one-frame solutions, it did not work even after putting it in one place and in the correct order. I’ve also tried tick pre-requisites though I may have missed something with those - All I did was setup the rotating Actor to be a pre-requisite of the position actor. I can re-attempt it to verify just in case something has changed since last week.
The spring arm component is introducing lag then. Try connecting the arrow to the root component of that actor without the spring arm in between. The spring is supposed to act kinda springy, which isn’t what you want here, so try without it.
Actually, if that were correct, the arrow would also have the lag. You can try anyway to see if you find new information though.
Thanks BlackRang666 but I’ve tried with a different component,also tried without the spring arm and tried once again doing it in the level blueprint with the execution order more visible. None worked.
I have begun testing attaching actor to components. Not really something I want to do since I want to be more modular for my purposes than attaching the actor, however with some logic I may be able to work something out with attach and unattach nodes. Preliminary testing shows what I’d expect and want when I attach the actor to the component using “Snap to target”.
Let me know if you have anymore ideas.
I’ve posted this as a bug because I believe this actually shows that the engine (4.15) is setting the values for the components transform before any update is done on those values which is causing this to appear as a one-frame off issue… … but then why does attaching work? I’m not sure.
From multiple methods ( event dispatchers, setting it up in the level blueprint) it seemed like it was working, however you are indeed correct that it is the spring arm causing the problem. When I was testing the situation again I tested under inheritance of the pitch, yaw, and roll of the spring arm which does work as expected. This rotation offset is happening because of the spring arm NOT inheriting the pitch, yaw, and roll!
I want the spring arm to NOT inherit these so that no matter which way the actor faces, the component (MOON or arrow) will face a specific direction.
Okay, I came up with two easier work arounds (excluding the attach and unattach complex one before). They are as follows:
First was to always set the spring arm rotation to the rotation I want. It works, but technically requires the spring arm rotation to be set after (all) rotation updates - which in my mind would require me to specialize a rotation function in the actor class and I’d use that (all the time) to set the rotation.
However this causes some strange behavior of actually counter clock-wise movement when coupled without inheriting rotation but works as intended when inheriting pitch, yaw and roll. Very Strange and not intuitive; I do not understand why it would logically do this ‘added feature’ even.
Secondly I attempted Absolute Rotation. However any placed actors will not update to use absolute rotation unless I REMOVE them from my level and reADD them to the level. It was reported in the question here back in 2015 (https://answers.unrealengine.com/questions/322437/changing-transform-into-absolute-location-in-paren.html) Except the title should read “Changing from relative to absolute will not update the class/actor if already in level.” This was making my tests fail and causing yet another layer. Although this makes the most sense and ease of use currently. It also follows intuition.
I’m going to proceed forward using absolute rotation. Thanks for your response BlackRang666.