sasikalar / gamekit

Automatically exported from code.google.com/p/gamekit
0 stars 0 forks source link

play action animation in reverse #305

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1.when playing an animation via an action actuator
2.start frame is last keyframe, end frame is first keyframe
3.animation plays from start keyframe to end keyframe and not reverse as 
expected

What is the expected output? What do you see instead?
for animation to be played in reverse, as it does in BGE

What version of the product are you using? On what operating system?

Please provide any additional information below.

Original issue reported on code.google.com by ChrisFG...@gmail.com on 24 Feb 2013 at 2:14

GoogleCodeExporter commented 9 years ago
I'm guessing it has to do with this, inside gkActionActuator:
    if (m_action)
    {
        if (m_start > m_end)
        {
            m_start = 0;
            m_end = m_action->getLength();
        }

Original comment by ChrisFG...@gmail.com on 24 Feb 2013 at 2:23

GoogleCodeExporter commented 9 years ago
Hmm,...wanna give a try on fixing that? I won't have time for this at the 
moment...

Original comment by thomas.t...@googlemail.com on 26 Feb 2013 at 12:11

GoogleCodeExporter commented 9 years ago
i've looked in to this and sort of came to the conclusion this function is part 
of it: 
http://code.google.com/p/gamekit/source/browse/trunk/Dependencies/Source/GameKit
/AnimKit/akAnimationBlender.cpp?spec=svn825&r=825#176

i'm not entirely sure what's going on in this function nor if it's really what 
I want to modify. basically i'm thinking gk was programmed only for advancing 
forward through the keyframes of an animation, and blending it. i realized i 
might have a chance getting around this by running the animation from the final 
frame to frame 1 of my animation by blending it over the action's total frame 
count. i haven't tested this yet though. 
i'll definitely take a look and see what i can get going, but like you i may 
not really be able to dig deep until later :-\

oh yeah, i also noticed the flipper/flip flop actuator action does not work 
also because of this same issue.

Original comment by ChrisFG...@gmail.com on 26 Feb 2013 at 12:18

GoogleCodeExporter commented 9 years ago
so attempting to skirt the issue with the blendin option did not help. i 
actually could not get blendin on the actuator to do anything different. i was 
under the impression it blended between two animations, and as this works in 
blender itself it does not in gamekit. thanks for your interest in looking at 
this, when you've a chance :)

Original comment by ChrisFG...@gmail.com on 26 Feb 2013 at 1:14