Rinterp bug on tick 4-25

Hi everyone! We are having a bug trying to do a mechanic and we don’t know at all why is this happening. What we want to achieve is the next:

We need the static mesh to point to the player. To achieve this we are doing the next:

The bug that we have, is that when the mesh needs to rotate more than -90º on the pitch, it really bugs out. We tried a lot of stuff and we can’t make this work. Anything helps at this point. In the next video, you can see the bug.

Thanks!

I would set your mesh up to that X points at the player, which is what the look at node is trying to do.

The problem is that we need the mesh to start pointing up. Imagine a sword pointing up at the start of the game, then the edge of the sword should start rotating until it points to the player. For this reason, we are adding the -90 to the pitch on the FindLookRotation node. Seems like the -90 Rotation on the pitch is breaking the interpolation. You can check the original rotation of the object by the arrow component. In the video, you can check the mesh point up at the start. If we don’t add the 90º on the pitch, the edge of the sword is never going to point the player.

Thanks for the response!

Can you not just rotate the sword mesh in the BP so that when X is pointing at the player, then you have what you need?

You can always attach the mesh to a scene component, and point the X of the component at the player. That way, you can have the sword in any orientation you like :slight_smile:

Sadly that solution does not work for me :frowning: If the X points to the player, the edge of the sword is not pointing to the player. The sword needs to start upwards (x pointing to the player) and at some point, start rotating the sword until the edge of the sword points to the player. I’ve done another video to explain the problem with the X poting to the player.

The video starts with the X pointing to the player and as you can see it works perfectly in all directions. When I enable the flag and the edge of the sword starts pointing at the player, it starts to bug as explained in the last posts.

I hope that with this video you can see the issue I have, it is hard to understand and my explanations are not the best, sorry for that :stuck_out_tongue: Luckily is easy to reproduce.

Thanks! :smiley:

You point the X of the scene component at the player. Attach the sword to the scene component so that when it’s X points at the player, the sword point is forward.

I can make a diagram if you don’t get it, but that’s later. Not at a machine right now…

Hi @ClockworkOcean . A diagram could help because I think I’ve done everything you said but it does not seem to work. Thanks for the help, really appreciate it :slight_smile:

Current Code:

Current component herarchy:

Yes, I see what’s going on, gimme about 1hr ( or less ).

Ok, two main problems:

  1. Look at rotation tries to align the X with the point of view. Notice that both your root component and the sword will want to align sideways on because of this ( see the red arrow, X, in your last diag ).

  2. This amounts to the same thing, but you need to know it for future reference also. The rotation of the actor ( which you’re setting ) and the rotation of the thing you want to fix ( your component ), may be totally unrelated to each other.

So the solution is twofold.

  1. Get your components organized:

Notice I have attached the sword parts to a scene component. I have the scene component selected, I have rotated it so it’s X, faces along the sword. So when I use look-at, it will align the whole sword, no matter how many parts.

Next, think about rotating the sword ( which we do by moving the scene ), and not the actor. Sometimes this is the same thing, but like I say, for example…

The code to make the ‘sword’ look at the player would be:

Tell me if that makes sense.

sword

Hi, @ClockworkOcean That made it! Now I understand what you meant. Thanks for your time and for helping us! :slight_smile: