[Behavior] LiteTween

  • lunarray Great plugin! There are a lot of mentions of group tweening in this thread, but I can't seem to find it in the latest version of litetween. I have a few objects and when they move together, I want them all to rotate around the center point of the middle object. Can anyone help? I can provide my .capx soon, once I've tweaked a few bugs.

  • Hey Lunaray. This is an odd request. I really enjoy working with light tween. However I've trying to clock down one of my side projects to run positional and rotational(especially rotation) at 24fps rather than the standard every tick. Would it be possible to have a the option for tween to only update when called.

    ie object.tween.update()


    I think your thinking about scenegraphs. Where as the grouping in LiteTween is giving them the same tag. So that way when you 'start/stop' and such. All tween with the same name will activate or stop.

  • jayderyu

    I will look into it, thanks! Because I want all the objects to rotate around a central point, I think I will need to pin them together.

    I would love some help into solving some bugs that are doing my head in. I have attached my .capx below and the program specifications are here. Ignoring the box and container on the right, the 8 boxes have a weight property allocated to them and once put on the scales, they move appropriately. The goal is for the user to use the scales to sort the boxes into sorted order (this is going to be used in an educational book teaching sorting methods). Boxes should switch if dropped onto one another, or return to their original position if not dropped on a box. All the movement for boxes between containers has been done, but I need to now animate the scales correctly depending on the weights. I've made a start, but I can't figure out:

    • When I should trigger the animations, especially in combination with the existing function. The program may need restructuring.
    • How to force the direction of the scale when it rotates
    • How to move the boxes with the scale and allow the user to move them afterwards

    If anyone could help, that would be grand! Cheers, Jack.

  • JackAttackNZ

    Pin kind of sucks for scenegraph modeling. Consider PIN to be nailing one object in the current postion+/angle to another object. Literally. You can't independently move a Pinned object while it's pinned. You need to unpin, move, pin again. And if your doing that; then there is no need for pin.

    Now if you just want another object attached to an object. Then use pin. So attach all your points, then rotate the center object and your good to go.

    I also suggest you posting for non LiteTween help in the How Do I section of the forum.

  • JackAttackNZ

    Group tween was there in the old EaseTween behavior, if you're okay with the state it is currently is, I suggest you take a look on it (the link to download is in the first page). You can just name the group on the tween behavior and use group start to play all tween at the same time. I haven't checked the capx yet since i haven't downloaded 166, will take a look after this. :>

    edit: Forget what i said above :<. if you need objects to keep distance against a central axis, I don't think it is a good use case for litetween/easetween. Compromise mode might help, but i'm not so sure. I think it is better to ask in the How Do I forum as suggested.

  • jayderyu

    I think putting that feature on the main litetween is not really a good idea <img src="{SMILIES_PATH}/icon_e_surprised.gif" alt=":o" title="Surprised">, so i forked it instead and make a simple capx here. Not sure if this is what you wanted.

    Oh, and can you tell me why you need 24fps update? I'm just curious as why it is not desirable to play with as much fps as you can.

    https://www.dropbox.com/s/enktbw4cm6ewo ... ps_cap.zip

  • Thanks for the fork. I appreciate that

    I found beahviours calculating angle everytick to kill my mid level testing device.

    As an example the simple Behaviour or Rotate even no matter what the size of the image. results were as follow

    100x100 image

    No Rotation: 60fps, 10% cpu

    Rotate behaviour: 30FPS, 40% cpu

    24fps by use of evey 0.040: 60fps, 20% cpu cycle

    2048x2048 image

    No Rotation: 60fps, 10% cpu

    Rotate behaviour: 20FPS, 50% cpu

    24fps by use of evey 0.040: 60fps, 20% cpu cycle

    calculating trigonometric math is terrible on medium devices. Where I'm sure LiteTween basic movement is fine. Some of the other more curving trigonometry I feel would be better being calculated less often. And proven so.

  • What is the difference between the settings "relative" and "absolute"? I couldn't see an explanation on the front page or in the extension itself.

  • if Your Target is for example x:100, y:100 in absolute mode it will move object to layout coordinates X100, Y100. In relative mode it will move "from object current position" 100 pixels to the right and 100 pixels down.

  • Oh right, yeah that makes sense. Thanks.

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • What about tweening SCALE

    size is okay but it doesnt cut it really. What if you have animation with different size of each frame (wchich is legit thing to do to optimize game memory usage). Scale would be far better and stable to use instead of setting width and height.

  • Okay, scale is on my to do list now . There are also some other features i'm thinking of adding, but i don't want to put on too many features.

  • PKrawczynski

    Okay, I've added playmode flip flop and scale tween. Last time I tried, it works well even with compromise mode.

    FYI, relative target does not really make too much sense here so both relative and absolute works exactly the same on scale tween.

    As usual, the download is at the first page.

  • I forgot to upload the files -.- sorry, it should work now...

  • Wow man thanks that was fast and is VERY usefull for projects

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)