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!

Object Anim


stef538
 Share

Recommended Posts

I created an object which I want to attach to my vehicle. This is all going great. I now need to attach a custom made animation to that object and play it in-game through a script but that's where I simply don't know what to do anymore. I can't seem to find any tutorials and what I find seems unclear or outdated. I found this but I don't know if it still works and before I invest a lot of time into this I thought that it might be better to ask here if anyone knows something about a tutorial or just something that does work.

Edited by stef538
Link to comment
Share on other sites

The tutorial you linked to is fairly recent I think and the person who wrote it is one of the better-know people for that kind of thing.

 

However, that tutorial seems to be more for fairly linear and uncontrolled animations... i.e. once you place the prop, it animates and that's it. I'm not sure you can tell an animated prop to stop animating, or to animate at different speeds or in different directions.  If you want more control, then animating by script is probably the way I would go for, as that allows you full control over animation type, speed etc...

 

If you want to keep the idea under wraps, then maybe just give a more general idea of how you want to attach the object, how you want it to animate, how much control you want over animation etc... and I am sure one of us can help with that.

Link to comment
Share on other sites

Okay, I understand that. What i'm trying to do can be compared to the 'Curve the bullet' from wanted.

[You can find it here]
https://www.youtube.com/watch?v=XJTXpItCqFU

So I have an object, attached it to a vehicle and then I want to do something like what happens in this video

Link to comment
Share on other sites

I have to admit, I am officially confused. What I see in that video, is a detached object (the bullet) following a curved path around a distractingly attractive solid object. Can you elaborate on what aspect of that video relates to the attached part of the problem? I'll watch the video again... for research purposes.

Link to comment
Share on other sites

Yes I can. I made a drwaing that hopefully will make it more clear as to what I mean.
XFtj1CK.png

Where 'The curve' is the animation that the object has to do. Is this more helpful?

Link to comment
Share on other sites

21 minutes ago, stef538 said:

Where 'The curve' is the animation that the object has to do. Is this more helpful?

What you have shown looks like a curved projectile path and that's more of a physics/maths problem rather than an animation problem. You'd fire something off at the initial angle and velocity and then it would curve towards the target point... like a homing missile.

 

If you rotate that image 90 degrees counter-clockwise, you have the image of a ball being thrown up into the air and then falling back down under gravity. you seem to be trying to do the same thing but on a different plane of reference.

 

So... a few questions.

 

Is this something that fires from an object attached to the vehicle, that targets a point a fixed distance ahead of the vehicle?

Or...

Is this something that is attached to the vehicle at a point that is in the centre of that curve and rotates around that point... like a pivot point?

Or...

Is this something that fires from a an object attached to the vehicle, that curves towards a point ahead of the vehicle, that changes distance based on the velocity/speed of the vehicle?

Or...

Have I missed an option that describes what you want to do?

 

Sorry for all the questions but my mind sees physics problem in that drawing, so I am just trying to see if that's the case or not.

Edited by LeeC22
Link to comment
Share on other sites

This: Is this something that fires from an object attached to the vehicle, that targets a point a fixed distance ahead of the vehicle?

Link to comment
Share on other sites

22 minutes ago, stef538 said:

This: Is this something that fires from an object attached to the vehicle, that targets a point a fixed distance ahead of the vehicle?

Okay... the good news is that I now understand the problem. The bad news is that this is a maths problem as it involves calculating an arc between two points on a circle and if there's one thing I fail miserably at, it's this kind of problem.

 

I tried to read a couple of articles on arcs and circles, as I suspected this might be the case and within about two sentences, I was lost. My eyes see the words but my brain just can't understand what it sees. I'm not going to be much help with this one I am afraid. :(

Link to comment
Share on other sites

"Animations" are understood as having an object move a bone relative to itself. What you seem to want to do, is to move an object around your entity, right? Think part of the confusion stems from there.

 

Depending on what you want to achieve, you can either de-attach the object from your entity and do something to make it reach its destination. I'd start with that basic thing first.

After that, you can apply your additional effects.

As I understand your goal, is you want to shoot an object in a curved motion to a target. What I'd do, is to first just fire and get it to reach the target - so a straight line.

In order to achieve a curve, I'd just use physics. Fire the object at an angle and apply a continuously changing sideways force to steer the object towards your destination.

Link to comment
Share on other sites

That's actually not a bad idea! I'll try something like that :)

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.