Runner style movement rotation on corners
I´m fairly new to blueprints, so please pardon my crude description of what my problem is.
I´ve been meaning to make a runner game with restricted 3 lane style movement (Subway surfer, audiosurf etc.). I´ve already figured out to do that by setting lerp for the "lanes", but I´ve run into a snag. If you turn the character, it won´t be centered, so the movement gets pushed to either side depending on when you turn. Here is a video of the problem https://www.youtube.com/watch?v=SdCccThnS50 (not my video).
So my question is: Is there a way to at least center the character on the floor after turning corner? (Or if possible taking the closest "lerp" location from where the character has turned? I.e.: if you turn left sooner, you would be on the left lane etc.) OR (otherwise) is it possible to make some kind of set vector/trajectory for the character on the floor meshes that the character could move between?
asked Oct 27 '15 at 07:19 PM in Blueprint Scripting
I had same problem and i solved this with colliders. Add 9 collider as 3x3 matrix to your corner floor object and in your_character blueprint declare int variable or enum. "side". 0 - means forward, 1 means left, 2 right. When character enters in corner after that get , input. If he pressed to right button save input in this variable. set "side" =2. And after begin overlap event from one of the 9 collider, get Your characters "side" value and if it's > then 0 change characters direction and after he leaves corner , reset side value. Also you need to do once "side" check in corner. good luck , i hope it will help you. (y)
answered Oct 28 '15 at 09:49 PM
Follow this question
Once you sign in you will be able to subscribe for any updates here