Download

How do I change the hierarchy via blueprint

I was trying to make an aim down sight system, but when the camera switched, the gun wouldn’t move. I couldn’t find any answers online, so any help would be much appreciated.

Here is a video of the problem:

1 Like

hi @MrWeeWah
Thats weird!

Brake the problem in smaller parts
You can correctly move the gun before switch camera?
if you switch back to the main camera, it will work correcctly?

If you are just adding a camera that is parented / attached to the gun it should not consume input.
If you are making comeplete new movement under the camera , that should consume both input.
What kind of blueprint do you have set up ?

Hello @Est_engine

Thanks for the reply,
I have fixed the problem, but am still looking for a more practical solution, since I’ve just overcomplicated the whole thing.

What I have currently done is duplicated the meshes of the gun and the FirstPersonCharacter, and then made it so when you switch to the second camera, the visibility of the original meshes turns off, while the second lot of meshes become visible, and since they are children of the second camera, they follow the second camera, and the same the other way.

I’m relatively sure the problem is with the parents and the hierarchy.

Here are the pictures of my current blueprints (sorry for the bad lighting)

Have a good one,
MrWeeWah

Hi @MrWeeWah
Whoa ! thats a blueprint ! XD
good you fixed the problem , if you want more practical blueprint
you could use some function to make it more usable and clear ,


Dear @Est_engine

Thanks again for your help. I did end up using functions and now my blueprints are a lot more readable :slight_smile:

However, when I tried to swap the gun to an AK, I ran into one slight problem, and I was wondering if you would have any idea how to help fix it.

The gun would not fit into the hand correctly, and as I do not have any experience in blender, I wanted to know if there could be any way to do this inside unreal engine.

As I was saying, can I move the hand in UE4, or is that only a thing for blender?

Cheers,
MrWeeWah

Hi @MrWeeWah
it really depend if you have attached the gun to a socket , you should be able to give him some offset,
otherwise you can put the gun as child of a scene component, and attach the scenecomponent .
This way you are able to better positioning the gun freely.

If you want to try blender: (that is always useful)

  1. Learn how set object mode in your blender
  2. learn how move the object itself by property or gizmo (works only in object mode)
  3. go in object - transform- apply all transform (this will set the origin )
  4. export the gun in your favorite extension

Hi @Est_engine

Sorry for the super late reply.

Got that working, but have run into a glitch here and you seem to know what you’re doing, so I decided to come back to the forums.

As you see the players mesh seems to be glitching for some reason.
Would you have any clue as to what could be causing this?

Couldn’t find anything on google so that’s a shame.

Thanks in advance,
MrWeeWah

Hi @MrWeeWah
I got that one too some time ago,
Try increasing the bounds scale,
https://answers.unrealengine.com/questions/153901/skeletal-mesh-disappearing.html

Sorry can’t type a proper message as I’m currently in a rush. Would you know how to get rid of this reflection/line thing that comes up on the screen from the muzzle flash? https://cdn.discordapp.com/attachments/809719515004665876/928939739942367242/IMG_4287.mov This effect looks glitched and bad so any help to get rid of it would be much appreciated.