Jump to content

Search the Community

Showing results for tags 'animations'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • HTML5 Game Coding
    • News
    • Game Showcase
    • Facebook Instant Games
    • Web Gaming Standards
    • Coding and Game Design
    • Paid Promotion (Buy Banner)
  • Frameworks
    • Pixi.js
    • Phaser 3
    • Phaser 2
    • Babylon.js
    • Panda 2
    • melonJS
    • Haxe JS
    • Kiwi.js
  • General
    • General Talk
    • GameMonetize
  • Business
    • Collaborations (un-paid)
    • Jobs (Hiring and Freelance)
    • Services Offered
    • Marketplace (Sell Apps, Websites, Games)

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


Website URL


Twitter


Skype


Location


Interests

  1. Hi everyone, thanks in advance for your help! I'm trying to achieve something like this on my PIXI app. I have two binary masks, which we can call "normal" and "expanded." Right now, if the user hovers over an object (sprite), I will tint the sprite to show the selection. However, I would like to animate something similar to the attachment. When the user hovers over the sprite, they should see the normal mask, and if they click on the sprite, then the animation should happen. How can I achieve this? I tried looking into the Filters documentation but I didn't really have a direction for doing this. Thank you!
  2. We are looking for a remote animator for our mobile game design team. This is a paid position in a professional and established work environment. Our design team has produced animations for some of the world's leading brands for over a decade. We are looking for an expert in Spine animation software. This position will begin with a few hours per week, but the right candidate will move to full time very quickly if not immediately. We need you available and online in our team backend between 9AM and 4PM EST (US) timezone. The position requires strong experience in mobile game art such as animation and typical 2d art workflow as you will be working with an design and development team coordinators with each project. Strong experience in Spine is mandatory, so speed and familiarity with the software is essential. This is a faced paced environment. The right candidate will be comfortable in this environment. The right candidate will have the potential to remain with us as a career, as many already have. Ideally we are looking for an animator who is comfortable creating animations for humanoid, non-humanoid, and VFX style animations. Our animations needs will vary from project to project on a daily basis. Our design team will prepare static assets and animation requests, and they will be handed to you for fast turnaround animations. Generally you will be working on several different projects concurrently, so being able to shift at a moment's notice from one project to another is essential. This is a high volume, fast paced position. Being able to envision the animation we are producing for a game is also essential. While our design team will provide you with a basic understanding of the animation such as "enemyHitFire: played when the enemy combatant is hit with a fire effect ranged spell", we expect the animator to be able to envision what they also can add to the animation to bring it to life. Creativity and added touches are a strong motivation factor for hire. Finally, because we often find ourselves creating full mini-games from concept sketches and discussions, we are in constant contact with the artist to explain the project when it begins and perform revision work. You must be able to understand English and communicate quickly without difficulty. Below are some of the things we will be wondering about (NOTE, we have training available for some areas such as 2D animation prep): 1.) How comfortable are you with Spine? 2.) How familiar are you with Photoshop techniques and environment? Can you adjust sprite delivery quickly to fit animation needs? 3.) Are you comfortable and experienced with game art, sprite sheets, and overall production flow? 4.) Are you imaginative or prefer working with very strict references and detailed animation descriptions? 5.) Can you animate without the use of IK and Mesh in your animations? If you are interested in the position, please email "careers" at "grimpanda.com" with your hourly salary requirements, portfolio links or examples of work, and best method of chat (Skype etc). Candidates who meet our requirements will be contacted via chat (text only, no worries about Covid hair!) to further discuss the position. These positions will be filled very quickly! Thank you and we look forward to hearing from you!
  3. Hello gamers and game developers, my name is Remos and I specialize in creating game sprites. I can create animated characters, props, tiles, buildings, etc. Notes - I don't work for free or royalties/shares. - I don't work with Pixel-Art Contact E-mail: [email protected] Portfolio: https://remusprites.carbonmade.com/ Twitter: https://twitter.com/RemosTurcuman I am here offering my services to anyone interested, here are some samples of my work :
  4. I'm not sure if this should be posted in https://forum.babylonjs.com/ or https://www.html5gamedevs.com/ so I'm posting on both. I have seen several posts and solutions to similar questions with the blender to babylon exporter (exporter V6.2.0, blender version 2.8) I've exported many animations from 3DS Max, but I'm fairly new to blender. I'm studying the Action editor, but obviously I'm not understanding something very fundamental. Basically, the issue is that the position of objects is different between the animation in blender and the .babylon I've read that you need to check "Only Currently Assigned Actions" or put a hyphen in the Action name. Autolaunch animations for each object. Apply transforms to each object. Set the location to where the object should be rotated about. Parent the objects to each other. Don't parent empties because you can set an empty to "Auto launch animations" All these things have helped tremendously. I'm still missing or not understanding something though. I've done my homework, but haven't figured it out. Any help would be greatly appreciated. Here is the playground link showing the issue. https://playground.babylonjs.com/#R82EL4#2 Here is a link to the .blend and .babylon files in dropbox https://www.dropbox.com/sh/fjdk4urwfckc5m9/AAAuDbBmwFtA466gAOylY7mTa?dl=0 In the world tab, Only Currently Assigned Actions is checked. Applied rotation and scale of parts. I set the location to where I want the part to rotate about. I select the redCube (Axis 1). Frame 10 I insert a LRS key. redCubeAction is created in the action editor Scrub to frame 40. rotate the redCube by -45 degrees on the x axis. and insert another key. The animation runs in blender and the .babylon as expected. All is good so far. I didn't bake the animation. It doesn't seem to make a difference. I select the blue cube (axis3) which is parented to the redCube. Click on New in the action editor. "Action" is created. I scrub to 50 and make a LRS key with blueCube selected. I scrub to 80, rotate blueCube along the X axis by +45 degrees and make another key. The robot is kind of squat there. The blueCube is at the end of the Red cube as a good robot should be. I play the animation in Blender and it runs as expected, but in the .babylon file, the blueCube is raised up a bit. Does anyone know why this happens and what I can do to prevent it? robotBlenderForForum.blend robotAnimation.babylon
  5. I wanted to play multiple animations with a AnimatedSprite. I setup the animated sprite in following manner. this.spriteSheet = this.loader.resources["images/atlus_runner.json"].spritesheet this.anim = new PIXI.extras.AnimatedSprite( this.spriteSheet.animations["walk"] ); this.anim.animationSpeed = 0.2; this.anim.loop = true; this.anim.play(); this.addChild(this.anim); When I wanted to play another animation, I did it in following manner var newAnim = this.spriteSheet.animations["jump"]; this.anim.stop(); this.anim.textures = newAnim; this.anim.play(); I stop the current animation, set the new textures and play animation again. Is this the correct way of playing another animation?
  6. I'm trying to add a bubble-pop spritesheet animation to my game. I have added other sprites fine, and when I add the sprite for the bubble, everything is still good. However, when I go to add the animations, I get an error, "Cannot read property 'add' of undefined. How can I animate the bubble? var config = { type: Phaser.AUTO, width: 1366, height: 768, parent: "canvas", scene: { preload: preload, create: create} }; var game = new Phaser.Game(config); function preload () { this.load.image('freeplayBG', 'images/freeplay-BG.png'); this.load.image('shark', 'images/nice-shark.png'); this.load.spritesheet('bubblePop', 'images/bubble_pop_under_water_spritesheet.png', {frameWidth: 394, frameHeight: 511} ); } function create() { //Set background this.add.image(685, 384, 'freeplayBG'); //Set shark and make draggable var shark = this.add.sprite(200, 300, 'shark').setInteractive(); this.input.setDraggable(shark); this.input.dragDistanceThreshold = 16; this.input.on('drag', function (pointer, gameObject, dragX, dragY) { gameObject.x = dragX; gameObject.y = dragY; }); //create the bubble sprite var bubble = this.add.sprite(700, 300, 'bubblePop'); console.log(bubble); //Sprite {_events: Events, _eventsCount: 0, scene: Scene, type: "Sprite", parentContainer: null, …} console.log(bubble.animations); // undefined console.log(this) //Scene {sys: Systems, game: Game, anims: AnimationManager, cache: CacheManager, plugins: PluginManager, …} bubble.animations.add('pop'); //error happens here bubble.animations.play('pop', 10, false, true);
  7. Good day, Sir. First, I want to say Thanks to everyone, who spent time to read this, I will be glad and happy to hear any advices or notes about this issue. Here is a PG: https://www.babylonjs-playground.com/#AI1MQC#2 Please, hide the SetEnviroment(), getPointsArray() and cameraMoveAnimation() functions bodies to make code more readable, I specially out them from main code. As you can see, there is 2 important lines: 82 and 83. Each points from "points" array is a real data from real project, that is not random numbers. So, the camera should move from: point1 to point2, then point2 to point3, then point3 to point4, and so on. There is no problems in start points, it's moving smoothly, but at point7 to point8 (and some others) camera rotates around itself. (Playground setted by default to reproduce this). It look like... flipping possible. I am using pivot method to create camera, and I can not use ArcRotateCamera in real project, because in some points it's broken because of gimbal look, for example, at point8 as I remember, it will dispose, and then appear, ArcRotateCamera was first, what I tried. So, the question is: how to prevent camera flipping around itself? ===================== upd: I tested a little more, if I am using lookAt method without animation and just setting new quaternion, it reproduces the same problem, but I don't have any idea why it happens and why it's changing rotation angle. ======================= upd2: I made additional example, which shows problem from outside: https://www.babylonjs-playground.com/#X66D1S#1 As you can see, big red sphere doing strange movement but if you change animation arguments in lines 82 and 83 from points[7], points[8] to points[6], points[7], sphere will do exactly what I needed, so what is it? Why it happens? How can I prevent this?
  8. Hello, We had made a game in Flash AS3, We converted it into HAXE so that it works on a web browser, but the game lags(animation). Now we want to convert this kind of game in HTML5 which has heavy animation, suitable for web browser - Is this Possible? We are looking for an alternative platforms/framework/library that would support our game. Any and every suggestion would help us a lot. Here is the demo link - https://www.youtube.com/watch?v=cNkXp-pTLic
  9. Hi, I am complete beginner with JavaScript and pixi.js. I've been learning these days the basics (sprites, shapes, text, buttons...) following the tutorial on the GitHub page. I was planning to use now animated sprites (using a sprite sheet) and found this on the documentation for the version I'm using (v4.8.2). That page contains a piece of code that doesn´t work on my project, and it is not recognised by vscode's intellisense either. // The more efficient and simpler way to create an animated sprite is using a {@link PIXI.Spritesheet} // containing the animation definitions: PIXI.loader.add("assets/spritesheet.json").load(setup); function setup() { let sheet = PIXI.loader.resources["assets/spritesheet.json"].spritesheet; animatedSprite = new PIXI.extras.AnimatedSprite(sheet.animations["image_sequence"]); } Is it deprecated, or am I missing something that is not mentioned there? Thanks in advice for your help. EDIT: I attached some pictures that showcase my issue.
  10. Is importing animations (in this case, from Blender) in an assetContainer currently supported? I can see the animation data in the .babylon file, but scene.animations, container.animations, and all mesh.animations arrays come up empty.
  11. Hello all, I am making a project and i need to play animations on a button click. but for some reason after the animation is played the first time it will never play again. I have been able to replicate the basics in a PG - https://playground.babylonjs.com/indexStable.html#V19ZT2 if you open console and enter window.startAnim.restart() then watch the animation play. then enter window.startAnim.reset(); it will reset, if you then do the restart command again. nothing will happen. why is this? also the version of babylon i am using (i cant find a version number?) has scene.Animatables where it seems all of the animatables (which to my understanding control the animations) are stored. and once the animation is played, it seems the animabable in scene.Animatables is deleted. however in the PG i cant find this variable so i assume its been changed since? however the outcome is the same still. hope this makes sense!! many thanks
  12. Hi, From this example - https://github.com/robhimslf/game-dev-invaders - I try to use bullets explosion animation. If I understand it right - author has created a group of 30 animations and is using them one by one. Here are the main parts: ... // This is a collection of explosions. var explosions; ... // Preload the explosion image. this.load.spritesheet( 'kaboom', 'explode.png', { frameWidth: 128, frameHeight: 128 }); ... // Setup our explosion animation. this.anims.create({ key: 'explode', frames: this.anims.generateFrameNumbers( 'kaboom', { start: 0, end: 15 }), frameRate: 16, repeat: 0, hideOnComplete: true }); ... // Create some explosions! explosions = this.add.group({ defaultKey: 'kaboom', maxSize: 30 }); ... and here is what's happening at the bullet's collision time: ... // Get the first explosion, and activate it. var explosion = explosions.get().setActive( true ); // Place the explosion on the screen, and play the animation. explosion.setOrigin( 0.5, 0.5 ); explosion.x = target.x; explosion.y = target.y; explosion.play( 'explode' ); ... However, if you launch animations more than 30 times (try to shoot all the targets) - there is a JS error: Uncaught TypeError: Cannot read property 'setActive' of null at handleCollision (invaders.js:391) at Function.handlePlayerCollision (invaders.js:408) at initialize.collideSpriteVsSprite (phaser.min.js:1) at initialize.collideHandler (phaser.min.js:1) at initialize.collideObjects (phaser.min.js:1) at initialize.update (phaser.min.js:1) at initialize.step (phaser.min.js:1) at initialize.update (phaser.min.js:1) at initialize.h.emit (phaser.min.js:1) at initialize.step (phaser.min.js:1) Line 391 is: var explosion = explosions.get().setActive( true ); If I understand it right - animations are not being reused. So after calling get() 30 times - no free animations left. How this can be fixed?
  13. I am having some problems with my sprite animations as I move between scenes. Each scene ran ok until I returned to it On my first playthrough, when i returned to the scene i was informed, via console.log, that the various animations' keys "were undefined or already in use" (so after using the github docs (....docs/animations_AnimationManager.js.html) I added the if config.key || this.anims.has(key) check. However it does not play and my console.log now outputs the following RED ERROR: Uncaught TypeError: Cannot read property 'getFirstTick' of null at initialize.play (phaser.min.js:1) at initialize.play (phaser.min.js:1) at scene1.create (PHASER3codePrinter.php:57) at initialize.create (phaser.min.js:1) at initialize.loadComplete (phaser.min.js:1) at initialize.h.emit (phaser.min.js:1) at initialize.processComplete (phaser.min.js:1) at initialize.removeFromQueue (phaser.min.js:1) at initialize.processUpdate (phaser.min.js:1) at Image.data.onload (phaser.min.js:1) Here is my code in create() create(){... if (!config.selectable2ANIMS0 || this.anims.has(config.selectable2ANIMS0)){ var skip = 1; }else{ this.anims.create({ key: 'selectable2ANIMS0', frames: [ { key: 'selectable2ANIMATION0'}, { key: 'selectable2ANIMATION1'}, { key: 'selectable2ANIMATION2'}, { key: 'selectable2ANIMATION3'}, { key: 'selectable2ANIMATION4'}, ], frameRate: 8.0, repeat: -1 }); } selectable2 =this.add.sprite(51.5, 61, 'selectable2').play('selectable2ANIMS0'); ...} Here is my scene calling (proof of concept for checking scenes) this.input.keyboard.on('keyup',function(e){ if(e.key=='1'){ this.scene.start('scene1'); } if(e.key=='2'){ this.scene.start('scene2'); } if(e.key=='3'){ this.scene.start('scene3'); } if(e.key=='4'){ this.scene.start('scene4'); } if(e.key=='5'){ this.scene.start('scene5'); } },this);} Anyone got any ideas?
  14. I would to use a a way to show loading progress for my loading scene but instead of a bar I have a gear sprite sheet that I would like to spin until loading is complete. Is there reference to this anywhere I have been combing through the P3 examples and can't figure out how to link the two together.
  15. Hello, I have a .babylon file exported from blender with a rotation animation but when I try to load it (I have tried both addMeshTask() and ImportMesh()) I get a "position animation" with zero values and "scaling animation" with fixed values. This cause me a problem when I call beginAnimation() because I'm not able to scale and position the model in my scene. Moreover when I edit the file and remove the "position animation" and "scaling animation" the engine somehow loads them again (even with cleaning cache). https://www.dropbox.com/s/789lx8gm3v7zrsc/container_ship_sinking.babylon?dl=0 https://www.dropbox.com/s/5odj9orv9cwcshp/container_ship_sinking.blend?dl=0 Why there are these animations added? Is it something wrong with my export in blender?
  16. import { utils, Application, Graphics } from 'pixi.js' import { PixiConfig } from './constants' const kind = utils.isWebGLSupported() ? 'WebGL' : 'canvas' utils.sayHello(kind) const state = { circle: { x: 0, y: 0} } const stage = () => { const graphics = new Graphics() graphics.lineStyle(0) graphics.beginFill(0xFFFF0B, .5) graphics.drawCircle(state.circle.x,90,60) graphics.endFill() return graphics } const gameLoop = delta => { state.circle.x += 1 + delta } const setup = () => { const app = new Application(PixiConfig) document.body.appendChild(app.view) app.stage.addChild(stage()) app.ticker.add(delta => gameLoop(delta)) } setup() Hi, I recently started to learn PIXI and now Im playing with animations using the ticker. This code actually draws a circle and I can se gameLoop() is being called and updating state.circle.x though it looks like it not redrawing the stage. What Im missing?
  17. I'm following this game example: https://phaser.io/examples/v2/games/starstruck When the character jump to the right or left you can see that the legs are still animated I want to change the animation if the user press up+left / up+right so basically I need to show only one keyframe, I tried something like that: ( see the lines where I set the keyframe to be 1 and another line I set it to be 6 ) I will appreciate your help function update() { // Collide the player and the stars with the platforms var hitPlatform = game.physics.arcade.collide(player, platforms); game.physics.arcade.collide(stars, platforms); // Checks to see if the player overlaps with any of the stars, if he does call the collectStar function game.physics.arcade.overlap(player, stars, collectStar, null, this); // Reset the players velocity (movement) player.body.velocity.x = 0; if (cursors.left.isDown) { // Move to the left player.body.velocity.x = -150; player.animations.play('left'); } else if (cursors.right.isDown) { // Move to the right player.body.velocity.x = 150; player.animations.play('right'); } else if (cursors.left.isDown && cursors.up.isDown) { player.frame = 1; } else if (cursors.right.isDown && cursors.up.isDown) { player.frame = 6; } else { // Stand still player.animations.stop(); player.frame = 4; } // Allow the player to jump if they are touching the ground. if (cursors.up.isDown && player.body.touching.down && hitPlatform) { player.body.velocity.y = -300; } }
  18. I'm trying to add some new animations by adding a new "if" section in my "update:function" code. All of my "walking" and "sprinting" animations following the first "if" section play as they should. However, when I attempt to animate my crutch attacks under the second "if" section, only the first frame of those animations is played. I'm using the same attack button because it's the same attack being animated in all directions. I combo'd with my arrow keys so that I could use the same attack key. When I change them to all to "else if" statements under my first "if" section they don't play because it is my understanding that once a key is used in an "if" statement all other attempts to use that key under that section will be ignored. My code is listed below. Solution? if(cursors.left.isDown) { player.body.velocity.x = -200; player.scale.setTo(.7, .7); player.play('walking'); } else if(cursors.right.isDown) { player.body.velocity.x = 200; player.scale.setTo(-.7, .7); player.play('walking'); } else if(cursors.down.isDown) { player.body.velocity.y = 200; player.scale.setTo(.7, .7); player.play('forward'); } else if(cursors.up.isDown) { player.body.velocity.y = -200; player.scale.setTo(.7, .7); player.play('backward'); } else if(sprintl.isDown) { player.body.velocity.x = -400; player.scale.setTo(.7, .7); player.play('sprinting'); } else if(sprintr.isDown) { player.body.velocity.x = 400; player.scale.setTo(-.7, .7); player.play('sprinting'); } else if(sprintu.isDown) { player.body.velocity.y = -400; player.scale.setTo(.7, .7); player.play('backsprint'); } else if(sprintd.isDown) { player.body.velocity.y = 400; player.scale.setTo(.7, .7); player.play('forwardsprint'); } else{ player.animations.stop(); player.frame = 29 player.body.velocity.y = 0; } if(cursors.left.isDown && fireButton.isDown) { player.body.velocity.x = -50; player.play('sidecrutch'); } else if(cursors.right.isDown && fireButton.isDown) { player.body.velocity.x = 50; player.play('sidecrutch'); } else if(cursors.down.isDown && fireButton.isDown) { player.body.velocity.y = 50; player.play('frontcrutch'); } else if(cursors.up.isDown && fireButton.isDown) { player.body.velocity.y = -50; player.play('backcrutch'); }
  19. I'm trying to add some new animations by adding a new "if" section in my "update:function" code. All of my "walking" and "sprinting" animations following the first "if" section play as they should. However, when I attempt to animate my crutch attacks under the second "if" section, only the first frame of those animations is played. I'm using the same attack button because it's the same attack being animated in all directions. I combo'd with my arrow keys so that I could use the same attack key. When I change them to all to "else if" statements under my first "if" section they don't play because it is my understanding that once a key is used in an "if" statement all other attempts to use that key under that section will be ignored. My code is listed below. Solution? if(cursors.left.isDown) { player.body.velocity.x = -200; player.scale.setTo(.7, .7); player.play('walking'); } else if(cursors.right.isDown) { player.body.velocity.x = 200; player.scale.setTo(-.7, .7); player.play('walking'); } else if(cursors.down.isDown) { player.body.velocity.y = 200; player.scale.setTo(.7, .7); player.play('forward'); } else if(cursors.up.isDown) { player.body.velocity.y = -200; player.scale.setTo(.7, .7); player.play('backward'); } else if(sprintl.isDown) { player.body.velocity.x = -400; player.scale.setTo(.7, .7); player.play('sprinting'); } else if(sprintr.isDown) { player.body.velocity.x = 400; player.scale.setTo(-.7, .7); player.play('sprinting'); } else if(sprintu.isDown) { player.body.velocity.y = -400; player.scale.setTo(.7, .7); player.play('backsprint'); } else if(sprintd.isDown) { player.body.velocity.y = 400; player.scale.setTo(.7, .7); player.play('forwardsprint'); } else{ player.animations.stop(); player.frame = 29 player.body.velocity.y = 0; } if(cursors.left.isDown && fireButton.isDown) { player.body.velocity.x = -50; player.play('sidecrutch'); } else if(cursors.right.isDown && fireButton.isDown) { player.body.velocity.x = 50; player.play('sidecrutch'); } else if(cursors.down.isDown && fireButton.isDown) { player.body.velocity.y = 50; player.play('frontcrutch'); } else if(cursors.up.isDown && fireButton.isDown) { player.body.velocity.y = -50; player.play('backcrutch'); }
  20. Hi, im new in phaser i have an error in animations when i press de right key i doesnt play the animation.
  21. I'm trying to create a sprite with two animations. The first animation play constantly, and the second one after some events, then stop and the first keep playing. I'm loading an atlas like this game.load.atlas('girl', '../../spritesheet.png', '../../sprites.json') where game is my Phaser.Game instance. Then I'm creating animations like this girlSprite.animations.add('idle', window.Phaser.Animation.generateFrameNames('idle', 1, 16), 5, true) girlSprite.animations.add('walk', window.Phaser.Animation.generateFrameNames('walk', 1, 20), 20, false) where girlSprite is my character sprite. My animations run like this girlSprite.animations.play('idle', 16, true) // some events later var idleAnimation = girlSprite.animations.getAnimation('idle') var walkAnimation = girlSprite.animations.getAnimation('walk') idleAnimation.paused = true // girlSprite.animations.play('walk', 20, true) girlSprite.animations.currentAnim = walkAnimation girlSprite.animations.play('walk', 20, true) This only pause my first animation and then throw an exception saying currentFrame is undefined. After that I debugged a little and found out that my girlSprite had the second animation with wrong frames defined, because when I created the second animations it used the frameData from the first animation and the currentFrame get never defined. So, I'm a little lost. I'm doing it right? is there a better method to define multiple animations on the same sprite? Any help would be appreciated
  22. Hey guys... This is a little video to show some of my new Character Animation System features and MORE specifically WHERE I NEED HELP... Basically I new help Computing What should be animation.blendingSpeed from a transition duration time... Yo @Deltakosh PLEASE WATCH THIS VIDEO SO YOU CAN SEE EXACTLY WHAT I TALKING ABOUT Sorry for the capital letters... I just really want you to see this (WHEN YOU GET A CHANCE) Take a look: BabylonJS Toolkit - Animation System Help Required
  23. Hi guys ... I am creating transitions and blend trees for BabylonJS toolkit... The very nature of the transition system in unity DOES NOT ALLOW traditional looping... EVERYTHING is a transition condition check... if NO conditions are meet after ANY animation is play it is stopped... the have various of way they id to LOOP back on itself with ANOTHER transition set state.... So basically they ALWAYS play one iteration of an animation and check it transition condition (which may be itself) and plays that animation clip... Now I am wonder what the performance impact of babylonJS of doing ANOTHER scene.beginAnimation in the OnAnimationEnd end event in the same frame as the on animationEnd Event (so its not choppy) VS playing it with a loop cycle... I won't know if cam to loop back onto itself until AFTER the animation has been played and its conditions are check... So I gotta 'Manually Loop Animations' even small few frame animations: Yo @Deltakosh ... Pinging you in too Here is an example of some of my state machine update logic, tell me why you think the impact performance of manually looping animations this way will be: private setCurrentMachineState(name:string):void { if (this._state == null || this._state.name !== name) { this._state = this.getMachineStateInfo(name); } if (this._state != null) { this._state.interupted = false; this._state.sts = BABYLON.MachineStatus.None; if (this._state.motion != null && this._state.motion !== "" && this._state.type === BABYLON.MotionType.Clip) { var local:BABYLON.MachineState = this._state; var blend:number = BABYLON.Constants.NoBlending; var speed:number = local.speed; local.sts = BABYLON.MachineStatus.Playing; this._animataions = this.manager.playAnimationClip(local.motion, this.owned, false, speed, blend, true, ()=>{ local.sts = BABYLON.MachineStatus.Finished; this.updateStateMachine(); }); } } } NOTE: this.manager.playAnimationClip basically calls scene.beginAnimation on all required components as well... then on this.updateStateMachine will cause the component to call this.setCurrentMachineState on WHATEVER the first transition CHECK says... including it might be itself again... Hope I explained that good enough
  24. Hello everyone, I'm trying to get my head around how to work with animations in Blender and Babylon. I have no trouble exporting/loading etc and my animations works except in one aspect. I have added some movements to my object in Blender and with movement I mean that my object changes position. My problem now is that if I "walk" with my object in the browser each animation will begin where the object is added during the initialization. I have tried to find some data giving me the new position of the object when one animation is finished. Problem seems to be that the position of the object (mesh) doesn't actually change during the animation even though the object "moves". Does anyone have any suggestions of how to solve this issue? Or aren't you supposed to change position in Blender, only make animations where the object stays in the same spot all the time? Just seems strange if that would be the case...
×
×
  • Create New...