Thank you for your answer.

The problem is I want to develop for Maemo 5 and the version of python clutter 
is 0.8.Clutter packages in Maemo 5


However thanks to your suggestion I found the solution, and the alpha 
ramp_inc_func, sine_inc_func, square_func, smoothstep_inc_func, exp_inc_func 
are working fine.


________________________________
De : Bastian Winkler <[email protected]>
À : [email protected]
Envoyé le : Mer 3 Mars 2010, 18 h 42 min 19 s
Objet : Re: [clutter] Help with BehaviourPath in clutter 0.8

Hi,

pyclutter-0.8 is really outdated and not supported anymore. The current
version is 1.0 and the upcoming 1.2 is right in front of your door. You
should really update to a recent version, as there are a lot of API
changes since 0.8 and even your given example won't work with 1.0!

Having that said, you're using the wrong alpha function.
clutter.sine_half_func should do the trick IIRC.


so long

:wq buz

On Wed, Mar 03, 2010 at 05:22:00PM +0000, Francis Bouvier wrote:
> Hi everyone,
> 
> I'm using pyclutter 0.8 and I would like to have some help with 
> clutter.BehaviourPath
> 
> I want to move an actor along a path and make it stay at the final point of 
> the path.
> Nevertheless when I'm using clutter.BehaviourPath, the actor is moving but 
> it's going back to its original position. How could I fix it at the final 
> point of my path ?
> 
> 
> Here is a code example of my problem :
> 
> import clutter
> 
> class interface():
> 
>     def __init__(self):
> 
>         # Stage
>         stage = clutter.Stage()
>         stage.set_size(780, 480)
>         stage.set_title('Clutter Interface')
>         color_black = clutter.Color(0,0,0,255)
>         color_blue = clutter.Color(0,0,255,255)
>         stage.set_color(color_black)
> 
>         stage.connect('destroy', self.QuitStage) # Quitter l'application
> 
>         stage.show()
> 
>         # Rectangle
>         rectangle = clutter.Rectangle()
>         rectangle.set_color(color_blue)
>         rectangle.set_size(80,80)
>         rectangle.set_position(100,200)
>         stage.add(rectangle)
>         rectangle.show()
> 
>         # Animation
>         timeline = clutter.Timeline(fps=60, duration=1500)
>         timeline.set_loop(False)
>         alpha = clutter.Alpha(timeline, clutter.sine_func)
>         behaviour_path = clutter.BehaviourPath(alpha = alpha)
>         behaviour_path.append_knots((100,200), (400,200))
>         behaviour_path.apply(rectangle)
> 
>         timeline.start()
> 
>         clutter.main()
> 
>     def QuitStage(self, stage):
>         clutter.main_quit()
>    
> if __name__ == '__main__':
>     app = interface()
> 
> 
>      

-- 
When facts don't fit the theory, change the facts.
-- Albert Einstein

GnuPG Fingerprint: 2FFF FC48 C7DF 1EA0 00A0  FD53 8C35 FD2E 6908 7B82



      

Reply via email to