I am using a SKTextureAtlas to animate a SKSpriteNode. The animation works, but it looks weird because for some reason the sprite's height is changing several times in the animation. This also causes the y position to change as well. Everything else remains the same except for the height and the y. The only thing I can think of is there are different amounts of transparent pixels within each frame. Each image is the same size though. Even when I use SKAction.animateWithTextures(atlasFrames, timePerFrame: 0.1, resize: true, restore: false), with resize set to true and false, the problem persists.
Sprite Kit SKTexture animation height unexpectedly changing
226 Views Asked by mhillsman At
1
There are 1 best solutions below
Related Questions in IOS
- URLSession requesting JSON array from server not working
- Incorrect display of LinearGradientBrush in IOS
- Module not found when building flutter app for IOS
- How to share metadata of an audio url file to a WhatsApp conversation with friends
- Occasional crash at NSURLSessionDataTask dataTaskWithRequest:completionHandler:
- Expo Deep linking on iOS is not working (because of Google sign-in?)
- On iOS, the keyboard does not offer a 6-character SMS code
- Hi, there is an error happened when I build my flutter app, after I'm installing firebase packages occurs that error
- The copy/paste functionalities don't work only on iOS in the Flutter app
- Hide LiveActivityIntent Button from Shortcuts App
- While Running Github Actions Pipeline: No Signing Certificate "iOS Development" found: No "iOS Development" signing certificate matching team ID
- Actionable notification api call not working in background
- Accessibility : Full keyboard access with scroll view in swiftui
- There is a problem with the request entity - You are not allowed to create 'iOS' profile with App ID 'XXXX'
- I am getting "binding has not yet been initialized" error when trying to connect firebase with flutter
Related Questions in ANIMATION
- Hover animation resetting( seemingly reverting back to original CSS and then again to hover)when moving mouse horizontaly accross a part of an element
- How to animate rotation of an image inside input control?
- Why does the React Spring animation executes 2 times?
- Use Animations with navigations in WearOS
- Formkit autoanimate doesn't work on my list
- Swap method results in disappearing points in Manim scene
- I use SwiftUI and use animation for Circle(), but when the screen is shown through NavigationLink, the location of the animation is not right
- How to animate calculated position/container height when viewport changes?
- How do I animate values of a Shape with multiple different animation transactions simultaneously?
- A list for displaying speeds
- Flutter animation stops on user click, but navigation doesn't occur. How can I make cards clickable during animation to trigger navigation?
- Problem picking up with interactive camera and orbitcontrols after amination camera moves "camera view"
- How to made a open widget with a vertical animation in flutter?
- Error: 'Mesh' object has no attribute 'use_auto_smooth' when importing .zmbx (Metabricks) file into Blender
- How to make an animation happen everytime I click on a div that has the animation?
Related Questions in SPRITE-KIT
- Label not showing on Tutorial SKScene
- How to create a mini-map of a SpriteKit scene using a different camera position
- Get name of SKTextureatlas
- Determine whether player character is at rest on static node
- How to detect the location of a mouseDown event for a iOS App using Swift?
- Update node's physicsbody with texture animation?
- How to detect touch inputs in SKScene on watchOS SpriteKit?
- Get actual size of applied texture to physicsBody?
- Changing a texture on a custom spritenode class drops the framerate, but only the first time?
- Swift Playground does not find SpriteKit particle file
- Why is SKTextureAtlas(dictionary:) Crashing
- SpriteKit animations freeze in second window on second display on Apple Silicon
- How to prevent SpriteKit overlay in SceneKit to get all key down events
- How can I Wrap a SKScene around a SCNNode as its texture?
- Prevent SpriteKit Metal Renderer from Exceeding Texture Size limit
Related Questions in SKTEXTURE
- Why SKTexture.preload raises memory issue on a real device?
- SKShapeNode fillTexture with rotation
- Is it possible to animate SKTexture with images?
- SKTextureAtlas: retrieved texture behaving differently compared to original
- SpriteKit Problems with cgImage on Xcode simulator but not on device
- How to use alpha component in gradient colors with GKNoise and SKTexture?
- How to get name of object as string in swift 3.0
- iOS, SpriteKit convert SKTextureAtlas/SKTexture into UIImage
- My SKTexture is size wrong for my SKSpriteNode
- Problem with Convenience Inits for SKSpriteNodes and assigning Variable values
- How to use a SKScene as texture for SCNSphere?
- Corrupt image is displayed by image view when using an atlas texture & calling its cgImage() function
- SpriteKit SKTextures memory footprint
- How do I repeat an animation multiple times simultaneously with respect to performance?
- SKMutableTexture makes other Windows unresponsive when its Window is occluded
Related Questions in SKTEXTUREATLAS
- Get name of SKTextureatlas
- Why is SKTextureAtlas(dictionary:) Crashing
- How do I check whether an SKTextureAtlas exists?
- Can you play a texture atlas in reverse in spritekit?
- App's second sprite atlas 'cannot be found'
- SKTextureAtlas: retrieved texture behaving differently compared to original
- My animated SKSprite nodes atlas won't change during touchBegan
- iOS, SpriteKit convert SKTextureAtlas/SKTexture into UIImage
- How do I use merged images for animation with Swift?
- Corrupt image is displayed by image view when using an atlas texture & calling its cgImage() function
- Xcode Simulator Showing Textures Correctly But Not Device
- How can I animate a SKPhysicsBody texture from an SKTextureAtlas
- SKTextureAtlas staying in memory
- How do I load textures from Internet using TextureAtlas in IOS?
- Using a sprite atlas, texture atlas, or asset catalog in SpriteKit projects
Trending Questions
- UIImageView Frame Doesn't Reflect Constraints
- Is it possible to use adb commands to click on a view by finding its ID?
- How to create a new web character symbol recognizable by html/javascript?
- Why isn't my CSS3 animation smooth in Google Chrome (but very smooth on other browsers)?
- Heap Gives Page Fault
- Connect ffmpeg to Visual Studio 2008
- Both Object- and ValueAnimator jumps when Duration is set above API LvL 24
- How to avoid default initialization of objects in std::vector?
- second argument of the command line arguments in a format other than char** argv or char* argv[]
- How to improve efficiency of algorithm which generates next lexicographic permutation?
- Navigating to the another actvity app getting crash in android
- How to read the particular message format in android and store in sqlite database?
- Resetting inventory status after order is cancelled
- Efficiently compute powers of X in SSE/AVX
- Insert into an external database using ajax and php : POST 500 (Internal Server Error)
Popular # Hahtags
Popular Questions
- How do I undo the most recent local commits in Git?
- How can I remove a specific item from an array in JavaScript?
- How do I delete a Git branch locally and remotely?
- Find all files containing a specific text (string) on Linux?
- How do I revert a Git repository to a previous commit?
- How do I create an HTML button that acts like a link?
- How do I check out a remote Git branch?
- How do I force "git pull" to overwrite local files?
- How do I list all files of a directory?
- How to check whether a string contains a substring in JavaScript?
- How do I redirect to another webpage?
- How can I iterate over rows in a Pandas DataFrame?
- How do I convert a String to an int in Java?
- Does Python have a string 'contains' substring method?
- How do I check if a string contains a specific word?
I heard about this issue with textures. I recommend you to make all textures of same size and add background for all images of 1% alpha (it wont be visible but it will be where). This is happening because invisible background is cut.
You can watch this guide for more information: https://www.youtube.com/watch?v=TDwSR3e6nN0