User Tools

Site Tools


en:guides:beginners:changing_direction

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
en:guides:beginners:changing_direction [2018/06/28 04:45 (7 years ago)] – In line with init projects sausageen:guides:beginners:changing_direction [2024/11/18 04:27 (8 months ago)] (current) – Highlights sausage
Line 5: Line 5:
 There are many ways to do this. The more correct way would be to create flipped animation graphics and hook up a bunch more animations and links. But we will do it the easiest way possible. When pressing the left key, we will flip the entire hero around in code: There are many ways to do this. The more correct way would be to create flipped animation graphics and hook up a bunch more animations and links. But we will do it the easiest way possible. When pressing the left key, we will flip the entire hero around in code:
  
-<code=cpp>+<code=cpp [highlight_lines_extra="1,2,6,8,10,12,13,15,16,17"]>
 orxVECTOR flipLeft = { -2, 2, 1 }; orxVECTOR flipLeft = { -2, 2, 1 };
 orxVECTOR flipRight = { 2, 2, 1 }; orxVECTOR flipRight = { 2, 2, 1 };
Line 32: Line 32:
 Therefore we need to ensure the pivot for our hero's graphic and animation set are both centered so that when we flip left and right, there won't be any issues with the physically body shifting incorrectly: Therefore we need to ensure the pivot for our hero's graphic and animation set are both centered so that when we flip left and right, there won't be any issues with the physically body shifting incorrectly:
  
-<code=ini>+<code=ini [highlight_lines_extra="5,15"]>
 [HeroGraphic] [HeroGraphic]
 Texture        = soldier_full.png Texture        = soldier_full.png
en/guides/beginners/changing_direction.1530186358.txt.gz · Last modified: 2018/06/28 07:45 (7 years ago) (external edit)