Author Topic: animation help  (Read 4890 times)

jedione

  • Hero Member
  • *****
  • Posts: 1135
  • punktoe
    • View Profile
animation help
« on: January 19, 2017, 07:47:42 PM »
anyone know how to add these together

spinning wile moving

animation.add( PropertyAnimation ( OBJECTS.pacy, pacman  ) );

animation.add( PropertyAnimation( OBJECTS.pacy, PropertyAnimations.rotate_left_90  ) );


first moves it.
second one rotates it.

try ed this but wont work.. "animation.add( PropertyAnimation.rotate_left_90 ( OBJECTS.pacy, pacman  ) );

thanks.......

here is the code
Code: [Select]
// for the moving cartridge
::OBJECTS <- {
pacy = fe.add_image("images/snes.png", flx*0.200, fly*0.250, flw*0.300, flh*0.400 )
}

local pacman = {
        when =Transition.ToNewSelection ,
property = "x",
start = flw*-0.300,
end = flx*0.300,
time = 1500,
loop=false
 }

animation.add( PropertyAnimation ( OBJECTS.pacy, pacman  ) );

//animation.add( PropertyAnimation( OBJECTS.pacy, PropertyAnimations.rotate_left_90  ) );
help a friend....

liquid8d

  • Global Moderator
  • Sr. Member
  • *****
  • Posts: 442
    • View Profile
Re: animation help
« Reply #1 on: January 21, 2017, 08:10:27 AM »
hey jedi,

try adding the position movement AFTER the rotation movement:

Code: [Select]
fe.load_module("animate")
::OBJECTS <- {
    image = fe.add_image("mame.jpg", 50, 150, 200, 50 )
}
local anim1 = {
    when = When.ToNewSelection,
    property = "position",
    start = { x = 50, y = 150 },
    end = { x = 300, y = 150 },
    time = 1500,
    loop=false
 }
local anim2 = {
    when = When.ToNewSelection,
    property = "rotation",
    start = 0,
    end = -90,
    time = 1500,
    loop=false
 }

animation.add( PropertyAnimation ( OBJECTS.image, anim2  ) );
animation.add( PropertyAnimation ( OBJECTS.image, anim1  ) );

jedione

  • Hero Member
  • *****
  • Posts: 1135
  • punktoe
    • View Profile
Re: animation help
« Reply #2 on: January 21, 2017, 10:49:29 AM »
oh that totaly makes sence now
iv already been doin this with say "alpha change" and "movment change"
some times when you see others do it then it click's....thanks bro
help a friend....

liquid8d

  • Global Moderator
  • Sr. Member
  • *****
  • Posts: 442
    • View Profile
Re: animation help
« Reply #3 on: January 21, 2017, 10:58:52 AM »
it really *shouldn't* matter what order you do them in, but this is an issue with the code I used to center objects when rotating :)

jedione

  • Hero Member
  • *****
  • Posts: 1135
  • punktoe
    • View Profile
Re: animation help
« Reply #4 on: January 24, 2017, 07:16:59 PM »
this is kin of what im tinkering with
https://youtu.be/o22bFxTT-VI
help a friend....

MushyBrains

  • Newbie
  • *
  • Posts: 3
    • View Profile
Re: animation help
« Reply #5 on: January 26, 2017, 04:28:00 AM »
This is a cool idea you got cooking. However and excuse me if I am wrong. But wouldn't it be better looking to have the cartridge art load off screen and just following a synced path with the cartridge?
Not sure if it's possible since I'm no programmer, but can't you "lock" the cartridge art area on the cartridge so that it follows the cartridge automatically? Just thinking if it's an object, that they can interact with each other. But maybe it would just be simpler to make both load as two separate objects and follow the same animation path synchronized.
But still, I really like it. Makes the display feel even more lively.

qqplayer

  • Sr. Member
  • ****
  • Posts: 301
    • View Profile
Re: animation help
« Reply #6 on: January 27, 2017, 05:34:00 AM »
this is kin of what im tinkering with
https://youtu.be/o22bFxTT-VI

Totally awesome , are you planning to release a complete theme based on this idea?
« Last Edit: January 30, 2017, 05:49:11 AM by qqplayer »

8bitsdeep

  • Full Member
  • ***
  • Posts: 49
    • View Profile
Re: animation help
« Reply #7 on: February 01, 2017, 05:48:38 PM »
This is a cool idea you got cooking. However and excuse me if I am wrong. But wouldn't it be better looking to have the cartridge art load off screen and just following a synced path with the cartridge?
Not sure if it's possible since I'm no programmer, but can't you "lock" the cartridge art area on the cartridge so that it follows the cartridge automatically? Just thinking if it's an object, that they can interact with each other. But maybe it would just be simpler to make both load as two separate objects and follow the same animation path synchronized.
But still, I really like it. Makes the display feel even more lively.

I think if you added both images to a surface and then animated the surface, it would be pretty easy. But I've not messed with the animation in AM much yet.