Jump to content

how to get the position of the head bone in gta sa android, using cleo script


Gdzin

Recommended Posts

I have no idea about Android, but on PC we do it like that:
 

    0A96: 0@ = actor 0@ struct
    0AC7: 6@ = var 2@ offset // vector 3d pointer
    0AA6: call_method 0x5E01C0 struct 0@ num_params 3 pop 0 bIncludeAnim 1 iBoneID 5@ vOffset 6@ // CPed__getBonePositionWithOffset
cleo_return 3 2@ 3@ 4@

 

There is no opcode to obtain bone position, but you can attach object to bone, then get  position of the object.

09A0: actor $PLAYER_ACTOR attach_object 26@ with_offset 0.0 0.0 0.0 on_bone 5 16 perform_animation "NULL" IFP_file "NULL" time -1

I stopped using this approach, as it seems be dedicated for cutscenes and have undesired side effects. (it hides actor's weapon)

Edited by MiranDMC
Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
  • 1 User Currently Viewing
    0 members, 0 Anonymous, 1 Guest

×
×
  • Create New...

Important Information

By using GTAForums.com, you agree to our Terms of Use and Privacy Policy.