IMG

 
IMG
IMG   IMG
  Welcome to GTAForums! Be sure to check out the Grand Theft Auto V Forum.

You are not registered! (If you are, click here to login) Registering is fast, free and easy and allows you to instantly reply to any topic on GTAForums.
Why wait? Click here to register your own unique username and become part of the ever-growing community!


( Log In | Register | Revalidate Validation E-mail )
Quick Log-In:
  IMG
       
>
Forum Rules GTA Modification Forums

Please post mod releases in the Mod Showroom

GTAGarage.com
free mod hosting from GTANet, simply login with your GTAForums account details

GTAModding.com
GTANet's modding wiki

GTA Modding Chatroom
provided by irc.gtanet.com (Don't have an IRC client? Click here)


  Reply to this topicStart new topicStart Poll

 [SA] Bone positions

 And stuff.
 
oksa8  
Posted: Saturday, Jul 21 2012, 08:27
Quote Post


Just call me Oksu
Group Icon
Group: Members
Joined: Sep 30, 2010

sf.gif

Member Award




So, I've done a little research and couldn't find how to get bone positions with CLEO. For example, if I'd need right foot position, what's the script for it, and what are bone numbers for each bone?
Users WebsitePM
  Top
 

 
Wesser  
Posted: Saturday, Jul 21 2012, 10:59
Quote Post


The complexity simplifier, the efficiency optimizer
Group Icon
Group: Members
Joined: Aug 19, 2006

eu.gif

Member Award




There are 2 useful functions:
  • 0x5E4280, for getting the position of a bone:
    CODE
    0x5E4280 - RwV3d *__thiscall CPed__getBonePosition(RwV3d *vPosition int iBoneID, bool bIncludeAnim)

    Thanks to DK22Pac for the last argument.

  • 0x5E01C0, for retrieving the position of a bone according to XYZ offsets:
    CODE
    0x5E01C0 - RwV3d *__thiscall CPed__getBonePositionWithOffset(RwV3d *vOffset, int iBoneID, bool bIncludeAnim)
Here is how the CLEO code looks like:
CODE
0A96: 0@ = actor $PLAYER_ACTOR struct
0AC7: 4@ = var 1@ offset
0AA6: call_method 0x5E4280 struct 0@ num_params 3 pop 0 bIncludeAnim 1 iBoneID 24 vPosition 4@ // CPed__getBonePosition
CODE
1@ = 0.0 // X offset
2@ = 0.0 // Y offset
3@ = 0.0 // Z offset
0A96: 0@ = actor $PLAYER_ACTOR struct
0AC7: 4@ = var 1@ offset
0AA6: call_method 0x5E01C0 struct 0@ num_params 3 pop 0 bIncludeAnim 1 iBoneID 24 vOffset 4@ // CPed__getBonePositionWithOffset

Now, the locals between 1@ and 3@ will contain the XYZ coordinates. Here you can find the list of all bone IDs.

This post has been edited by Wesser on Saturday, Jul 21 2012, 11:19
PMMSNPlayStation Network
  Top
 

 
oksa8  
Posted: Saturday, Jul 21 2012, 11:05
Quote Post


Just call me Oksu
Group Icon
Group: Members
Joined: Sep 30, 2010

sf.gif

Member Award




Sweet, thanks Wesser! :]
Users WebsitePM
  Top
 

 

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

0 Members:

Topic Options Reply to this topicStart new topicStart Poll
Search topic for posted by (exact match)



 
IMG IMG