Coding

 Reply to this postStart new topic

How to check car Z axis rotation?

uokka
post May 19 2011, 02:10 PM
Post #1


Actually living entity

Posts: 143
From: Earth
Joined: 15-January 11



How to check if / how fast a car is spinning about its Z axis?

For using this..
SANNY
07DB: set_car 0@ rotation_velocity_XYZ 8@ 9@ 10@ through_center_of_mass

10@ is 0.0 which stops any Z rotation down.gif

cheers

This post has been edited by uokka: May 19 2011, 02:10 PM


--------------------
My english is just perfekt. I am only not sure, whether I it rightly utilize..
. . .
Go to the top of the page
 
+Quote Post
Deji
post May 20 2011, 01:48 AM
Post #2


Coding like a Rockstar!

Group Icon

Posts: 1,468
From: ???
Joined: 28-May 09



This should do the trick.

SANNY
:GetCarRotationVelocity{\_[float, float, float]__(hVehicle)_}
0A97: 1@ = car 0@ struct
000A: 1@ += 0x4C
0A8D: 2@ = read_memory 1@ size 4 virtual_protect 0
000A: 1@ += 0x4
0A8D: 3@ = read_memory 1@ size 4 virtual_protect 0
000A: 1@ += 0x4
0A8D: 4@ = read_memory 1@ size 4 virtual_protect 0
0017: 2@ /= 0.01999999955296516
0017: 3@ /= 0.01999999955296516
0017: 4@ /= 0.01999999955296516
0A8D: 5@ = read_memory 0xB7CB5C size 4 virtual_protect 0
0073: 2@ /= 5@
0073: 3@ /= 5@
0073: 4@ /= 5@
0AB2: ret 1 2@ 3@ 4@


--------------------
Go to the top of the page
 
+Quote Post
uokka
post May 20 2011, 08:44 PM
Post #3


Actually living entity

Posts: 143
From: Earth
Joined: 15-January 11



ohmy.gif
Damn, i never thought it would be this complicated. Thanks a lot.
I'll try this soon..


EDIT:

Tryed it, but..
0x4C = Z Movement // (Hight Up/Down speed)
0x50 = X Rotation // (1@ += 0x4)
0x54 = Y Rotation // (1@ += 0x4)

it was one step further:
0x58 = Z Rotation // (1@ += 0x4)


And this is what i was asking for needed:
SANNY
0A97: 1@ = car 0@ struct
000A: 1@ += 0x58  // Z rotation (DEC 88)
0A8D: 2@ = read_memory 1@ size 4 virtual_protect 0
0017: 2@ /= 0.01999999955296516
0A8D: 5@ = read_memory 0xB7CB5C size 4 virtual_protect 1
0073: 2@ /= 5@

thumbsup.gif


EDIT:
By the way, what data contains this addres? 0xB7CB5C
google won't tell me.


This post has been edited by uokka: May 27 2011, 10:49 PM


--------------------
My english is just perfekt. I am only not sure, whether I it rightly utilize..
. . .
Go to the top of the page
 
+Quote Post
Reply to this postStart new topic

1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members: