Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Dark GDK / Set Object Interpolation...

Author
Message
heyufool1
15
Years of Service
User Offline
Joined: 14th Feb 2009
Location: My quiet place
Posted: 18th Aug 2009 03:13 Edited at: 18th Aug 2009 07:02
Hi! I'm working on a RPG and I want to have my character to have a smooth transition from standing to walking and walking to standing. So I'm using dbSetObjectInterpolation (...) and it works almost all the time, but every now and then the object's frame doesn't change. This is the relevant code that I'm using:



Anyone have any ideas on why this could be happening?
Nevermind! I fixed it

Use Google first... it's not rocket surgery!
Mista Wilson
16
Years of Service
User Offline
Joined: 27th Aug 2008
Location: Brisbane, Australia
Posted: 18th Aug 2009 05:38
Could be the change is happening too quickly for you to notice.. you may need to add some kind of timer to make it stay in a certain state for a certain time... or add checks to see if an animation is already playing before you change it..that will make sure that if the object is already playing an animation, it will finish it before starting a new one, or depending on how you set it up, you might just have it go through the first couple of frame before it changes to the new one, depends on the look you are after really....

If it ain't broke.... DONT FIX IT !!!
heyufool1
15
Years of Service
User Offline
Joined: 14th Feb 2009
Location: My quiet place
Posted: 18th Aug 2009 05:53
Quote: "Could be the change is happening too quickly for you to notice.. "

I know that's not the case because the frame I want the model to be at is a frame where the model (a human) is standing but the frame it's at is in the middle of the running stage. As for the way I want it to look, I want it to look like it does when it's working properly but sometimes it doesn't work properly. Oh and I forgot to mention that when I set the interpolation to 100 for instant frame switch and then switch frames I never have a problem. It's a problem with what it's suppose to do and not design problem. By your post I think, that you think it's not doing it how I want it to look, but it's more along the lines of it's not doing it all. Thanks for the suggestions though!

Use Google first... it's not rocket surgery!
Mista Wilson
16
Years of Service
User Offline
Joined: 27th Aug 2008
Location: Brisbane, Australia
Posted: 18th Aug 2009 06:05 Edited at: 18th Aug 2009 06:08
Ahh I see. That is strange. Although the fact that you say there is no problem when you set interpolation to have instant frame changes, only sometimes when you have a lower interpolation value, makes me think it is a timing issue.

Have you tried to narrow it down to if the problem occurs only between certain frame changes or does it just seem random ? If its not random it could be something to do with how the model is animated/rigged itself, but if its just random then I really dont have any idea beyond a timing problem.

You could try altering the change so that it will only occur after a keypress or that once it starts to change, it will advance one frame at a time through keypresses, at least that way you would be able to narrow it down to a certain iteration of your loop, or a certain frame of the model or whatever....

Just ideas to try though, it could actually be some rare bug in GDK.. but I think thats unlikely at the moment anyway.. still alot of things to try I think

Good Luck

EDIT : If you are really set on having custimozed anims and things, and you have the money, the addon EZ Animation may be worth a look in, I know allows you to do all sorts of cool things with an object's animations, it is commercial though, so may not be an option for you ... I dont know of any freeware plugins that do anything similar things though im sorry, so I cant suggest one...

If it ain't broke.... DONT FIX IT !!!
heyufool1
15
Years of Service
User Offline
Joined: 14th Feb 2009
Location: My quiet place
Posted: 18th Aug 2009 06:57 Edited at: 18th Aug 2009 07:00
Thanks! I just figured out that it works perfectly all the time until my inventory is filled up. Then when I try to pick up an item when my inventory is filled, my animation freezes. The good thing is, is that it'll probably be easily fixable when I narrow it down and, the animation is fixed when you click somewhere else to move
Thanks for your help Mista!

Quote: "EZ Animation"

Do you mean Enhanced Animation? Because I can't find anything on EZ Animation (only EZ Rotation)

EDIT: About 10 seconds after posting this I fixed it lol.

Use Google first... it's not rocket surgery!
Mista Wilson
16
Years of Service
User Offline
Joined: 27th Aug 2008
Location: Brisbane, Australia
Posted: 18th Aug 2009 07:02
Oh yes im sorry, I do mean Enhanced Animation..... that was a typo caused by me not thinking while typing lol...

If it ain't broke.... DONT FIX IT !!!
heyufool1
15
Years of Service
User Offline
Joined: 14th Feb 2009
Location: My quiet place
Posted: 18th Aug 2009 07:03
Lol no problem, I'll think about buying that, although I don't know how easy it is.

Use Google first... it's not rocket surgery!
Mista Wilson
16
Years of Service
User Offline
Joined: 27th Aug 2008
Location: Brisbane, Australia
Posted: 18th Aug 2009 07:31
Here is the source code the Example #3 that comes with Enhanced Animations and the EXE & media for the demo(I obviously cant post the actualy library so you wont be able to compile the code, but you can run the example and look through the code, the product is quite easy once you get your head around how it works...

Which is to take the animation data out of the model, and work with it, then apply it bak to the model(the same or different or whatever...)

This example just shows how EA's interpolation works....

You can have the model walking at the same time as the top half of it is reloading it's gun etc etc.... its quite a useful product...

Im not trying to plug it or anything, lol, just giving you an example of it's use....



If it ain't broke.... DONT FIX IT !!!

Attachments

Login to view attachments
heyufool1
15
Years of Service
User Offline
Joined: 14th Feb 2009
Location: My quiet place
Posted: 18th Aug 2009 19:40
Very cool! Although so far in my game I don't have a need for this, simply because my character is either standing, moving, or attacking, and the interpolation command makes the transitions very nice. But that library will be very helpful for making a shooter . Thanks for the information Mista, you've been a big help!

Games are like life, they should never stand still.

Login to post a reply

Server time is: 2024-10-01 10:34:02
Your offset time is: 2024-10-01 10:34:02