More simple approach - th-cam.com/video/TJHv9oefrHg/w-d-xo.html More stable approach - th-cam.com/video/eAmY1gLdXjA/w-d-xo.html Previous Part: th-cam.com/video/1Hf_VhJGJUA/w-d-xo.html Unreal Top Down Playlist: th-cam.com/play/PL32YMM6O66N9ZCGD1mrqw__BcsxjZpkBt.html Unreal Short And Easy Playlist: th-cam.com/play/PL32YMM6O66N8_rX7SZCS9yaaN8zRmiHlE.html
Heads up for people who, like me, have the entire thing going CRAZY spinning : Make sure to go to your spring arm and UNcheck "inherit pitch/yaw/roll" or basically everything under "Camera settings". Also, thanks a lot for this series, really short and helpful :]
Whew, thank you so much! I was putting this tutorial on top of another one I already did, and I was about to rage from the crazy spinning. I appreciate it!
Heads up for everyone: this is based off of cursor casting a ray, and that ray hitting something. Your character will go nuts constantly changing rotation forward and backward if the cursor does not hit an object, so a quick fix is place a plane beneath your entire map, and tick off visibility so the ray hits a collision, then giving the hit result, but also you do not have an eye sore of a plane sitting there
If you want the same functionality but only when you click (click to rotate towards mouse position), use Left Mouse Button instead of Tick and drag out from Pressed in Left Mouse Button. Thanks for the video btw.
@@bujny-games Thank you for replying. I found that tutorial and followed it and it worked well. However the character could not get back to the free movement and kept facing into that direction. I did some work around that and got that fixed too, but now I am facing a different problem with inverted Axis. I am using Gamepad Axis 2D with Index Dead Zone Type : Radial. Any Idea how to fix it ?
Works great with just one issue, if you have multiple meshes at different heights such as grates over a lava pit below, the character starts to glitch out as I believe what's going on is the cursor is sending hits out and registering the different positions of the meshes causing very subtle rotation as it calculates. Is there any way to turn the cursor hit detection off when over a static mesh?
Hi, you can add check if collision is found by checking return value of GetHitResultUnderCursorByChannel. Also I'm going to make tutorial about rotation without collisions
I dont get what you're saying? The return value is just a boolean that check if it hit anything.. If it hits nothing it'll just not look anywhere@@bujny-games
my game glitches out when the mpouse is in the top middle section of the screen. Through print I found that even though the mouse Z axis location should be positive, in this area it can't decide if the location is positive or negative and the rotation glitches out.
but in this video we don't use Z axis of mouse hit result at all.... also you don't need to change rotaion from negative to positive because "Find Look Rotation At" will return good value if you use only X and Y values of character and target locations.
@bujny-games I had it set to only x and y for the character. When I styay Z axis I mean my mouse position . It's all good though as I Jerry rigged a solution lol. I have it shoot a line trade from the mouse location and the player turns to look there, so far no issues. Great video though, certainly came in handy even with this fix 👍
So this is easy enough to do, but I am having problems getting it to work with replication, it works fine server side, and client side, but clients do not replicate their rotation to each other or the server, I've tried various methods of getting the rotation to be handled by the server but I am running into a wall with no progress, any suggestions would be much appreciated.
@@bujny-games I found out what is the problem. My game is isometric instead of top down, so it was affecting the vectors. I traced lines, problem solved.
Well, my character only move when my curser is over something like a cube (the blue one in default template) or an actor. Otherwise, it does not follow the mouse. Any idea? Edited: Well to make it work, I had to go in the collision preset of the floor (SM_Cube) and change the preset to "Physical Actor" and now everything is working.
the only thing that confuses me is that when there is an object in the way the character stops following the cursor and goes back to the default position until the cursor is back in view. Anyone got any good tips on how to fix that?
More simple approach - th-cam.com/video/TJHv9oefrHg/w-d-xo.html
More stable approach - th-cam.com/video/eAmY1gLdXjA/w-d-xo.html
Previous Part: th-cam.com/video/1Hf_VhJGJUA/w-d-xo.html
Unreal Top Down Playlist: th-cam.com/play/PL32YMM6O66N9ZCGD1mrqw__BcsxjZpkBt.html
Unreal Short And Easy Playlist: th-cam.com/play/PL32YMM6O66N8_rX7SZCS9yaaN8zRmiHlE.html
Heads up for people who, like me, have the entire thing going CRAZY spinning : Make sure to go to your spring arm and UNcheck "inherit pitch/yaw/roll" or basically everything under "Camera settings".
Also, thanks a lot for this series, really short and helpful :]
Whew, thank you so much! I was putting this tutorial on top of another one I already did, and I was about to rage from the crazy spinning. I appreciate it!
I have Inherit Pitch, Inherit Yaw, and Inherit Roll all unchecked and the spring arm still rotates with the mesh. What could I be missing?
Heads up for everyone: this is based off of cursor casting a ray, and that ray hitting something. Your character will go nuts constantly changing rotation forward and backward if the cursor does not hit an object, so a quick fix is place a plane beneath your entire map, and tick off visibility so the ray hits a collision, then giving the hit result, but also you do not have an eye sore of a plane sitting there
I've search for hours in forums and documentations.. your video and explanation was on point and exactly what I needed! You've earned a subscriber! :)
Great to hear! Thank you.)
If you want the same functionality but only when you click (click to rotate towards mouse position), use Left Mouse Button instead of Tick and drag out from Pressed in Left Mouse Button.
Thanks for the video btw.
that works until your start moving, then rotation resets every tick anyway
Great video, very easy to follow and instructive:)
Thank you for this.
Great explanation, thank you! How to do the same thing for the right thumbstick of a gamepad?
Hey thank you for this tutorial. It works great with the Mouse Input but I am facing a problem binding look at button to Controller. What to do ?
Hi, here is a tutorial for the stick. I hope it will be helpful. th-cam.com/video/V71sIt1vh0M/w-d-xo.html
@@bujny-games Thank you for replying. I found that tutorial and followed it and it worked well. However the character could not get back to the free movement and kept facing into that direction. I did some work around that and got that fixed too, but now I am facing a different problem with inverted Axis. I am using Gamepad Axis 2D with Index Dead Zone Type : Radial. Any Idea how to fix it ?
thanks this help me a lot
Works great with just one issue, if you have multiple meshes at different heights such as grates over a lava pit below, the character starts to glitch out as I believe what's going on is the cursor is sending hits out and registering the different positions of the meshes causing very subtle rotation as it calculates.
Is there any way to turn the cursor hit detection off when over a static mesh?
Hi, you can add check if collision is found by checking return value of GetHitResultUnderCursorByChannel. Also I'm going to make tutorial about rotation without collisions
I solved this by placing an invisible plane with visibility collision on ground level, and set vis collision to "ignore" for all objects in the map.
I dont get what you're saying? The return value is just a boolean that check if it hit anything.. If it hits nothing it'll just not look anywhere@@bujny-games
my game glitches out when the mpouse is in the top middle section of the screen. Through print I found that even though the mouse Z axis location should be positive, in this area it can't decide if the location is positive or negative and the rotation glitches out.
but in this video we don't use Z axis of mouse hit result at all.... also you don't need to change rotaion from negative to positive because "Find Look Rotation At" will return good value if you use only X and Y values of character and target locations.
@bujny-games I had it set to only x and y for the character. When I styay Z axis I mean my mouse position . It's all good though as I Jerry rigged a solution lol. I have it shoot a line trade from the mouse location and the player turns to look there, so far no issues.
Great video though, certainly came in handy even with this fix 👍
thank you
So this is easy enough to do, but I am having problems getting it to work with replication, it works fine server side, and client side, but clients do not replicate their rotation to each other or the server, I've tried various methods of getting the rotation to be handled by the server but I am running into a wall with no progress, any suggestions would be much appreciated.
Hi, I think that you probably have problem with player index in functions like "Get Player Controller" or "Get Player Pawn"
Even though orient rotation to movement is disabled, the character does not follow the cursor after moving for a while.
Maybe you skipped something)) PS it’s the second video
@@bujny-games I found out what is the problem. My game is isometric instead of top down, so it was affecting the vectors. I traced lines, problem solved.
Well, my character only move when my curser is over something like a cube (the blue one in default template) or an actor. Otherwise, it does not follow the mouse. Any idea?
Edited: Well to make it work, I had to go in the collision preset of the floor (SM_Cube) and change the preset to "Physical Actor" and now everything is working.
Сэнк ю фор эназа месод.
sank you for the tutorial
the only thing that confuses me is that when there is an object in the way the character stops following the cursor and goes back to the default position until the cursor is back in view. Anyone got any good tips on how to fix that?
Sorry, my bad, In this video I forgot about checking if hit was, you can use "Return Value" of GetHitResultUnderCursorByChannel
@@bujny-games where do i connect the return value of "GetHitResultUnderCursorByChannel"?
Great tutorial btw, exactly what i needed
Add "Branch" node and connect "Return Value" to "Condition" and do rotation only if "Return Value" is true
@@bujny-games thank you
It's spinning along the mouse cursor too fast. Did I miss something?
아 해결 했다 ^^
i need tis for mobile joystick
i can't add the BP to the class setting inerithed interface
you can't add the BP class because only interfaces allowed.
@@bujny-games then i am missing some steps somewhere
i cant split the pin for hit result 3:05
Hotline miami :
my screen is flipping hard
Did you watch the first video?
@@bujny-games i solved it, thanks
oh my god the player controller is talking to the character via an interface. jfc