Let the initial position of your character be (a, b). Let your character move with any keyboard input. Let your character’s velocity be (a+b, a - b). After the following keyboard inputs, what would be the answers to the given questions? a = 5 b = 2 Keyboard Inputs: Space, p, t, No Input, Space, Space i. What is the position of your character? ii. Along which direction did your character move? Find the vector.
1. Let the initial position of your character be (a, b). Let your character move with any keyboard input. Let your character’s velocity be (a+b, a - b). After the following keyboard inputs, what would be the answers to the given
questions?
a = 5
b = 2
Keyboard Inputs: Space, p, t, No Input, Space, Space
i. What is the position of your character?
ii. Along which direction did your character move? Find the
i.
Given:
a = 5
b = 2
For the first Space input, the position of the character will be (5 + 2, 5 - 2) = (7, 3).
For the second p input, the position of the character will be (7 + 3, 7 - 3) = (10, 4).
For the third t input, the position of the character will be (10 + 4, 10 - 4) = (14, 6).
For the fourth Space input, the position of the character will be (14 + 6, 14 - 6) = (20, 9).
For the fifth Space input, the position of the character will be (20 + 9, 20 - 9) = (29, 11).
Thus, the final position of the character is (29, 11).
Step by step
Solved in 2 steps with 1 images