Hi everyone, i’m very new to UE world and now i’m on stage where you learn about blueprints. so
i want to make simple mechanic where rectangle is a character and mechanic is just jumping and if you want during that jump, you can also flip.(jumping is not a problem but i don’t know how to make it flip). I can’t find any tutorial close to what i want. if you guys can share any link or info how to make jump and flip with slight simulation (maybe when you flip your character can fall down because of bad balance)
P.S sorry for my bad English.
You can simply put a “set” node of a boolean type variable after your jump execution and set it’s value to true. After the jump is complete, set it’s value back to false.
Then create a new execution chain for your flip mechanism, you would probably want to create a new input action for that, and place it in your character blueprint just like how you did for the jump mechanism. But before the part where we will perform the flip, place a branch node and set it’s condition to be that boolean variable we’ve created for this task and plug it into that input action. You will plug the branch node’s true pin to the following code:
For the flip itself, since you mentioned your character is a cube, you can rotate it around y axis with a “set world rotation” node and you can use a “finterp” node to make it smooth. To do that, right click on the rotation pin of the set world rotation node and split it. You can then get the finterp node, enter the value 360 to it’s target pin and plug it into the y axis we’ve just exposed. You can adjust the interp speed to your liking.
But I think you’re just using this for a test so you can just add a flip animation instead of that in the future when you’re working on a model. Hope this helps!
That’s pretty much on the dot. Id set up an input action that is combo type, with jump as being the required action, and execute the flip like Vis described under that