Jump to content
    1. Welcome to GTAForums!

    1. GTANet.com

    1. GTA Online

      1. Los Santos Drug Wars
      2. Updates
      3. Find Lobbies & Players
      4. Guides & Strategies
      5. Vehicles
      6. Content Creator
      7. Help & Support
    2. Red Dead Online

      1. Blood Money
      2. Frontier Pursuits
      3. Find Lobbies & Outlaws
      4. Help & Support
    3. Crews

    1. Grand Theft Auto Series

      1. Bugs*
      2. St. Andrews Cathedral
    2. GTA VI

    3. GTA V

      1. Guides & Strategies
      2. Help & Support
    4. GTA IV

      1. The Lost and Damned
      2. The Ballad of Gay Tony
      3. Guides & Strategies
      4. Help & Support
    5. GTA San Andreas

      1. Classic GTA SA
      2. Guides & Strategies
      3. Help & Support
    6. GTA Vice City

      1. Classic GTA VC
      2. Guides & Strategies
      3. Help & Support
    7. GTA III

      1. Classic GTA III
      2. Guides & Strategies
      3. Help & Support
    8. Portable Games

      1. GTA Chinatown Wars
      2. GTA Vice City Stories
      3. GTA Liberty City Stories
    9. Top-Down Games

      1. GTA Advance
      2. GTA 2
      3. GTA
    1. Red Dead Redemption 2

      1. PC
      2. Help & Support
    2. Red Dead Redemption

    1. GTA Mods

      1. GTA V
      2. GTA IV
      3. GTA III, VC & SA
      4. Tutorials
    2. Red Dead Mods

      1. Documentation
    3. Mod Showroom

      1. Scripts & Plugins
      2. Maps
      3. Total Conversions
      4. Vehicles
      5. Textures
      6. Characters
      7. Tools
      8. Other
      9. Workshop
    4. Featured Mods

      1. Design Your Own Mission
      2. OpenIV
      3. GTA: Underground
      4. GTA: Liberty City
      5. GTA: State of Liberty
    1. Rockstar Games

    2. Rockstar Collectors

    1. Off-Topic

      1. General Chat
      2. Gaming
      3. Technology
      4. Movies & TV
      5. Music
      6. Sports
      7. Vehicles
    2. Expression

      1. Graphics / Visual Arts
      2. GFX Requests & Tutorials
      3. Writers' Discussion
      4. Debates & Discussion
    1. Announcements

    2. Support

    3. Suggestions

Happy Holidays from the GTANet team!

Rotating a ped bone (or adjusting animation)


ikt
 Share

Recommended Posts

Hi there,

 

For implementing synchronized steering wheel rotation animations, I've stumbled on an issue. For "low" vehicles, such as sports cars, an animation is used that only supports 180 degrees of wheel rotation either side ([email protected]@[email protected]), compared to the more flexible 360 degrees of rotation either side, for "normal" cars ([email protected]@[email protected]).

 

When using the std variant on low vehicles, the upper body leans forward more, and the arms clip through the steering wheel, basically grabbing air. The animation does seem to play properly despite that. I've tried finding a way to use the std animation but with the upper-body position of the low variant - or to dial in something manually. So far, I found no useful animations tricks to do such a thing.

 

Is this possible at all?


There's some information on UC about bones, but from what I gather, seems like bone positions can only be read this way, not adjusted.

 

Bone -> Coords code

Edited by ikt
Link to comment
Share on other sites

I don't think it's possible to manipulate the animations and it's probably down to how animation systems work now. When 3D animation all started, it was done by setting absolute bone positions that were interpolated between. With current systems, it's all about inheritance of transformations and rotations. The only bone that has a position as such, is the root bone, everything else is relative to that, based on how bones higher up the chain have been transformed.

 

So the hands only exist at a position, because the bones above them have been translated/rotated in a way that puts them there. The only time that really changes, is when IK is introduced into the equation and at that point, the bone on the end is driving things. You can see an example of that when you step up onto a kerb and the foot hitting the ground forces the leg animation to alter. To be honest, that's how I thought the steering animation worked at first, because it seemed logical to attach the hands to the wheel and to let the hand positions drive the upper-body animation but it seems that isn't the case.

 

What you might find, is that if you can play the upper body variant of the normal animations, the hands will be high above the steering wheel. The root bone is probably angled back further in that position, so any non-low animations would be angled further back as well. There's also some weird stuff happening in a car, you might have noticed that when you are in a vehicle, the player's position, is the same as the car's position and not on the seat where you'd expect it to be.

 

Unfortunately, this might just be a no-win situation unless you can find some way of intercepting the matrix transformations that are being applied to the bones. But they might not be stored in the entity data, which could make them difficult to find. If you could do that, you could transform the seat bone that determines where the player is sat in the vehicle, to get the hands into the right  place... actually, isn't it possible to get the entity matrix? I wonder if you could override the matrix position or rotation, or whether that's read only as well? Might be another avenue to look into... I once tried doing things with it but bad things happened but that could have been user-error.

 

I was sat thinking last night, 3 years ago, Jedijosh was telling everyone "custom animations are almost here" and showed what I presumed to be nothing more than a ped model exported into 3DS max and rendered out. 3 years later, custom animations aren't here, which is probably a good indication of how complex things are now.

 

Edit: Hmmmm, just noticed SET_PED_CAN_ARM_IK and SET_IK_TARGET, there may be an answer there if you can force the arms into IK mode.

Edited by LeeC22
Link to comment
Share on other sites

Hmm, I can't seem to get it to work, so I'll just be content with using the 360 degree animation for sports cars. Intercepting and changing the matrix transformations e.t.c. is a bit too hard for me, I'm afraid 😅
 

For most part it looks decent, just with lots of steering, the limitations are visible sooner.
 

 

Edited by ikt
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
 Share

  • 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.