and now i want to implement a code that makes the sword move(still on y axis) from one side to another according to the player mouse movement, kinda like in a 2d game called ‘‘deepest sword’’.
in ideal yes, it is indeed what i want . if its possible of course
But there is no need for the sword tip to look directly at the mouse cursor position, but if there is the way to accomplish that i will definetely implement it A video of a possible way to implement it, unfortunately a lot of helping links has been outdated or straightup removed from this piece of gold in the hay
Also there is an option this in my mind, just letting mouse movements control the float variable that will either go positive or negative depending on the mouse position of screen.
Not follow, just increase or decrease the values by inputting mouse movement data
I checked and it is a very helping thread, but notice that my sword is not an actor, its just a mesh, will it work if i reference it instead of an actor?
You could i guess target the mesh but it would be easier placing the sword into a blueprint actor and using that example as a reference, it shouldn’t change how you are using it in anyway and adds extra functionality later if you need it to.
Can you show the mouse cursor so i can see whats happening in relation to the mouse position. also check that collisions are set to none if it is getting stuck, unless of course you need it to ?