rehico Posted June 24, 2014 Share Posted June 24, 2014 I've been using the newopcodes.cleo and I tried to get an objects rotation matrix and X, Y and Z angle. It always seems to return 270.000000 270.000000 359.999481 regardless of the actual rotation of the object which I don't understand. Can anyone explain what I'm doing wrong? My code is below. 0A98: [email protected] = object obj [email protected] += 200D02: [email protected] = matrix [email protected] x_angle 0D03: [email protected] = matrix [email protected] y_angle 0D04: [email protected] = matrix [email protected] z_angle Link to comment Share on other sites More sharing options...
Wesser Posted June 24, 2014 Share Posted June 24, 2014 You forgot to read the matrix pointer. 012 345 678 9A BCD EFG HIJK LMN OPQR STUV WX YZ Link to comment Share on other sites More sharing options...
rehico Posted June 24, 2014 Author Share Posted June 24, 2014 How do I do that? Link to comment Share on other sites More sharing options...
Wesser Posted June 24, 2014 Share Posted June 24, 2014 Simply read the memory address pointed by the object struct plus the offset you specified. 012 345 678 9A BCD EFG HIJK LMN OPQR STUV WX YZ Link to comment Share on other sites More sharing options...
rehico Posted June 24, 2014 Author Share Posted June 24, 2014 Like this? 0A98: [email protected] = object obj [email protected] += 200A8D: [email protected] = read_memory [email protected] size 1 virtual_protect 00D02: [email protected] = matrix [email protected] x_angle 0D03: [email protected] = matrix [email protected] y_angle 0D04: [email protected] = matrix [email protected] z_angle Link to comment Share on other sites More sharing options...
Wesser Posted June 24, 2014 Share Posted June 24, 2014 Yeah, with the exception that you have to read the content of a 4-byte pointer, so size 4. 012 345 678 9A BCD EFG HIJK LMN OPQR STUV WX YZ Link to comment Share on other sites More sharing options...
rehico Posted June 24, 2014 Author Share Posted June 24, 2014 Ah thank you I appreciate it Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now