Mario Kart Wii Gecko Codes, Cheats, & Hacks
Help Reading Player Cart Rotation? - Printable Version

+- Mario Kart Wii Gecko Codes, Cheats, & Hacks (https://mariokartwii.com)
+-- Forum: Hacks/Modding (https://mariokartwii.com/forumdisplay.php?fid=14)
+--- Forum: Code Support / Help / Requests (https://mariokartwii.com/forumdisplay.php?fid=61)
+--- Thread: Help Reading Player Cart Rotation? (/showthread.php?tid=2308)



Help Reading Player Cart Rotation? - WKoA - 10-29-2024

Basically in Mario Kart the player rotation (stored 148 bytes after the player location, as found via the Grab Location Gecko code) stores a 4-byte float that goes between -1 and 1. Negative indicates turning left, positive indicates right. What confuses me is that negative and positive swaps if you rotate the car around 360 degrees, and this is throwing off my transportation system (I've recorded consecutive kart positions and rotations that can be teleported to for training an AI (I know this has been done before, I want to do it from scratch myself).

I've thought about several solutions such as modifying whenever this number hits 1, however that is very hard to do and also imperfect since the player could turn to 1 and then turn back, and it would look the same as if they simply turned back the way they came.

Is there another memory location that would tell me to flip the sign, or a better way to track location that I am missing?