WorldPositionOffset incorrect in dynamic object

Flower, attached to socket “Ammo” of “FP_Gun” in “FirstPersonCharacter” in 1st Person Template have incorrect World Position Offset during Look around in the game.
Here is the example project:
Link

Hello,

Could you please provide a bit more information:

How are you attaching the flower to the socket?
What are the expected results, and what results are you seeing?
What is it that you are trying to accomplish?

Hello,

I put the flower in the middle of the Cube via World Position Offset and opacity in material. All works correct if cube is static. But if I attached via my blueprint and viewport this cube to the “Ammo” socket of “FP_Gun” in “FirstPersonCharacter” in 1st Person Template, when look around (with mouse) the flower is moving and it is not already in the center of the cube- the world position offset is not correct in this situation

Could you explain what it is you’re trying to accomplish? It is possible that your current setup may not be the best way to get the results you’re looking for.

I want flower to be always in the middle of the Cube (which is attached to the Pawn) regardless of looking around of the Pawn (with mouse) in game!

1.You have cube (Static Mesh, 100x100x100)

2.Set flower texture in the middle of this Cube (via OpacityMask and WordlPositionOffset in the Cube’s material)

3.Attach this Cube to some socket of the Pawn (gun, hand, head, whatever)

4.When move mouse (look around) in game, Flower is not in the middle of the Cube any more => so WorldPositionOffset is wrong in this situation!!!

If put Cube somewhere in the game (but not attached to any Pawn’s socket) the Flower will be in the middle of the Cube how is expected.

Why you moved this question to “Rendering”. What arguments do you have that this is not a bug?

Hey ,

This is not a bug and I will explain why. When moving/transforming you are not accounting for the player characters camera vector or world position. Therefore when you move or rotate, the WPO is trying to maintain the same distance from the place where it is attached. This is why it does not stay centered to the screen.

I am not entirely sure what you are trying to do by using the WPO on the mesh, but if you simply move the mesh to the desired location and keep the Simple grass wind node, and delete your other WPO, it functions as it sounds like you are trying to get it to.

Thank you,

If this is not a bug, why in not moving cubes WPO is CONSTANT (flower is in the middle of the cube), but when moving the WPO become VARIABLE and change its value all time during the movement?

I just trying to set flower in the middle of the cube and I do not use Simple Grass Wind. If it is still complicated to be understanding I could draw pictures …

I think the question here is what are you ultimately trying to achieve by using your approach?

The material you provided does have the Simple Grass Wind node, so that is why I mentioned it. Your explanation is not clear, so we need to understand what effect you are going for, why you are using your approach, and what you believe to be the bug.

Thanks,

The constant value of WPO in not attached mode become not constant (variable) in attached mode. And you continue to say that this is not a bug?!?!?!
Please, refer this question to some advanced material specialists

Unfortunately, if we cannot get the information requested in my previous post then we cannot assist you further. The project you have provided and the blueprint set up using the material with WPO is working as expected.

You are reporting that the flower is shifting position when the player rotates, but this is because of how you have set it up within the blueprint, and the math you have applied within the material editor. You need to add a reference to the players Camera Vector or use another approach to account for the rotation so WPO does not appear to shift.

Just show me how you will put a flower in the middle of “1M_Cube” static mesh which will be always in the middle, both in attached and non attached (to some Pawn socket) mode?

Here is the proof that you are wrong:

1.Take “SM_Flag” (with “M_Flag_Inst”->“M_Flag”) from “1.4 Vertex Animations” of “Material_Advanced” Map/Level of ContentExamples.

2.,Attache (and make smaller size to fit in the camera) this static mesh (“SM_Flag”) to socket “Ammo” of “FP_Gun” in “FirstPersonCharacter” in 1st Person Template.

3.Play to see how Flag is twisted (broke its WPO) when Pawn looks around with mouse.

What will you say about that?