ajom
Well-known member
OK, this opcodes can set the Y and Z angle rotation of a Car
But I cannot find any opcode that "changes" the X-Angle of the Car. Does anyone know how?
I have searched in GTA SA Memory Addresses at byte offset +20 or the car structure are the list of car rotations:
But why does this code not match???
Code:
0175: set_car 22@ Z_angle_to 315.0
0731: set_car 34@ y_angle_to 73@
But I cannot find any opcode that "changes" the X-Angle of the Car. Does anyone know how?
I have searched in GTA SA Memory Addresses at byte offset +20 or the car structure are the list of car rotations:
Each vehicle object is 2584 (0xA18) bytes. It starts at 0xC502AA0.
For each vehicle in the pool:
- +20 = [byte] Contains a pointer to the rotation/position matrix (84 bytes):
- +0 = [float] X-axis Rotation (Grad)
- +4 = [float] Y-axis Rotation (Grad)
- +8 = [float] Z-axis Rotation (Grad)
- +16 = [float] X-axis Rotation (Looking)
- +20 = [float] Y-axis Rotation (Looking)
- +24 = [float] Z-axis Rotation (Looking)
- +48 = [float] X-axis Position
- +52 = [float] Y-axis Position
- +56 = [float] Z-axis Position
But why does this code not match???
Code:
077D: 18@ = car 8@ x_angle
0A97: 17@ = car 8@ struct
18@ += 20 // point at rotation matrix
// get the X axist ground rotation
0085: 16@ = 17@ // (int)
16@ += 0
0A8D: 16@ = read_memory 16@ size 4 virtual_protect 0
// get the X axis Facing Rotation
0085: 15@ = 17@ // (int)
15@ += 16
0A8D: 15@ = read_memory 15@ size 4 virtual_protect 0
0AD1: show_formatted_text_highpriority "%f~n~%f~n~%f" time 2000 18@ 16@ 15@