Skip to content
Discussion options

You must be logged in to vote

Okay so, I tried to do it myself and it is indeed a tricky case to solve. Had to spend around 2 hours, that's what I came up with

First, you need to initialise a new variable for the player object, called end_turn_angle.
Then, you need to modify the glide code in the scr_player_glide():

// Turn around		
if input_down.left && glide_angle != 0 || input_down.right && glide_angle != 180 || glide_angle % 180 != 0
{
	if input_down.left && glide_angle >= 0 || input_down.right && glide_angle <= 0 
	{
		if glide_angle <= -90
		{
			end_turn_angle = 180;
		}
		else if glide_angle <= 0
		{
			end_turn_angle = 90;
		}
		else if glide_angle <= 90
		{
			end_turn_angle = 0;
		}
		else
		{
			end_turn_a…

Replies: 1 comment 7 replies

Comment options

You must be logged in to vote
7 replies
@TrianglyRU
Comment options

@KauanGamer2130
Comment options

@TrianglyRU
Comment options

Answer selected by KauanGamer2130
@KauanGamer2130
Comment options

@KauanGamer2130
Comment options

@KauanGamer2130
Comment options

@TrianglyRU
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants