I did not understand how we are actually making the dynamic movement

Hi Hasan,

What do you mean by ‘dynamic movement’? What exactly would you like to have explained?

I mean how Rick managed to make the movement looks better when he used the provided code in the screen shot ?

The concept is to slightly rotate the spaceship depending on the position relative to the centre of the screen (pitchDueToPosition) and the user input (pitchDueToControlThrow). For example, if you move the spaceship to the left edge, it should be slightly rotating clockwise. That’s what makes the movement feel more dynamic.

The code might be a bit confusing because there are so many different names but if you read it carefully with the information above in mind, you’ll notice that Rick indeed just rotates the spaceship around the x-, y- and z-axis.

Is this what you wanted to know?

Thank you for your replay now I understand it
So in this way any game mechanic can become dynamic for example like shooting a gun and moving a car right ?

Absolutely, you can use it in all games where you want to make the movement feel more dynamic. :slight_smile:

1 Like

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.

Privacy & Terms