Sword offset follow the mouse shenanigans

My only coding experience is with the Gamedev.tv course Unity Visual Scripting: Learn Programming The Easy Way, so I may be way out of my depth with this course and what he says is complete gibberish to me. That being said, I am able to somewhat grasp what I’m supposed to make happen but he does not give a very thorough demonstration of how it is supposed to function.


I have succeeded in getting the offset effect that follows the mouse, however, when I move the cursor to the far left of the screen, when the angle value reaches around 180 or so, it is bent over backwards, so to speak. Is it supposed to do that? I can’t tell if that is expected behavior from the 2 seconds of testing he did, an inch from the character, moving only vertically. I did briefly attempt to use clampf to stop it from happening, but that in turn just made some snapping to occur instead.

Maybe someone could tell me if what I have made in Visual Scripting is comparable to the video?

The sword offset gets a bit wonky at both 180 and 0 degrees as the system decides which side the sword should be facing. I’ve never quite gotten it perfect.

I’ll be honest, my experience with Visual Scripting is fairly limited. This looks right, but I may be missing something.

Privacy & Terms