Hello everybody !
So, I have a character in UE4, who can hold a lantern. When his lantern is on, his arm is up, and when it’s off, he put his arm a bit down.
I thought first doing two different animations, one for each state, in Blender, but I saw that I can influence an animation in UE4. And after some researchs, my head gonna explode x) I tried to follow this tutorial :
And I think I got the beginning, but the last part, I’m totally lost (I understand why I don’t like code x) ). So, I was wondering, can somebody could explain how I could do that ? I can’t wrap my head around how to tell how do we tell to Unreal which bones we want to move. And yeah, the skeleton is quite messy. I did it with an add-on on Blender, didn’t expect it to make all those bones… Would it be better to redo it ?
Thanks in advance for your answers !
Bonus question : for the lantern the character will hold, is it better to do a skeletal mesh that we link to a socket on the hand ? Or does it work with a static one ? And how do we link it to a socket ? I saw that we can put a parent socket on a mesh, but I can’t enter anythin in it
Animating the bones directly in a blueprint might not be the easiest option. Unreal does provide Control Rig to create animations in the Editor or you could create the animations in Blender, as you discussed.
As an alternative, you could create a pose in the up state and one in the down state and then use an animation blueprint to blend between the up pose and down pose. For an example, please see:
For attaching objects, using a Skeletal mesh looks like the easiest option as you appear to already have that set up:
Well, instead of editing everytime, I’ll go there. So, I decided to erase all the blendspaces I did, reimported the animations, and tried to do other blendspaces. I tried first with the Blendspace and the settings I said before : weid movements. I tried with a blendspace 1D, and the animations for the lantern when on : movements are good. I duplicate this blendspace, and replace the animations by the ones where the lantern is off : weird movements. I put an animation with lantern off in the blendspace with the lantern on : weird movements.
So, it seem to come from the animations, but I don’t understand why. The animations come from Mixamo, that I reworked a bit on Blender, but for each state (idle, walk, run) of the player, I duplicated the anim, so I don’t see why it’s working for only when the lantern is on…
For the sweet mother of god !!! Just because of the collisions of the lantern, that was clipping a bit in the character during the movement… So many hours lost looking in the wrong place, gimme a stool and a rope please x)
Hello again !
Well, I took way more time than I thought to try it… I have a question : is it possible to use two blenspace 1D in a same state machine ? Because, as I have different animations if the character have is lantern on or off for the idle, walk and run of each, I did one blenspace for each state. I tried to put my two blendspaces in the same, and with a condition if lantern on or not, but it only makes my characters move super strange (too quick and doesn’t go in the right direction).
I prefered to do another blenspace just to have the animations I want for the arm. I tried to have the blendspace with the lantern off first (as it’ll be the starting point), and then, adding each animation with the lantern on, in another state, with condition like is running or is walking, and all linked together, but it’s ugly and it doesn’t seem to work x).
And one thing I don’t understand is that I have the same thing for my two blendspaces, but there’s only the one with the lantern on that works, the other do the same strange movements that I said earlier…
Static objects are the best…
Little edit : I guess it’s the blenspace where my lantern is off that doesn’t work properly. If I have the blenspace with my lantern on at the beginning, the character move fine, but once I toggle the lantern, and switch to the other blendspace, it does this weird movements…
Second edit : I was wondering, is it possible to do it with a simple blendspace, and not the 1D ? I tried with a simple blendspace, putting the speed on the horizontal axis, and a variable I called “LanternMovement”, that I set to something like 10 when I turn on the lantern, and back to 0 when turning it off, but it does exactly the same weird movements as the blenspace 1D with the lantern off… So it seem every other blendspace I’ll create will have that, except the first I created…