Character leaning rotation
Ive been working on an endless runner type game where the player controls a bike, Ive not used a vehicle BP but instead i just used the 3rd person BP template.
Its going well so far but I'm just trying to get the bike controls to look more realistic, at the moment the bike goes forward without any input and the player is able to turn left and right to avoid incoming obstacles which is all fine. But id like it so the player character (The Bike) leans left and right when turning to make it look more believable and move like a two wheeled vehicle would. Id also like the camera to lean with the player movement but ill be fine doing that when i figure out how to make the bike lean i think.
Just looking at the 3rd person character BP it looks like this part is where it controls the character turning rotation? and possibly where ill be able to control the character lean (Roll?) with some extra work.. ill keep playing around myself but so far Ive not been able to figure it out :/
Any help or a nudge in the right direction would be much appreciated :) Cheers!
asked Aug 04 '14 at 06:45 PM in Blueprint Scripting
Finally! after hours of trial and error i figured out a way to get it working :D This may be a little different to anyone else that is looking for the same solution because I'm doing a line trace on the character but it may help so ill post what i did to get it working anyway :) I just removed the roll stuff from the line trace as i don't really need it anyway, i then put the roll into a Var so i could alter it later. Next i simply just changed the Var with a left and right key press that went to a "set var" node and that's it! annoyed that i didn't do this earlier but i guess i didn't really have a clue.
Now my bike has some sweet left and right leaning :D
answered Aug 08 '14 at 11:37 PM
Follow this question
Once you sign in you will be able to subscribe for any updates here