Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8065617
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T11:43:29+00:00 2026-06-05T11:43:29+00:00

I have a animated CAEmitterLayer with CAEmitterCell and the animation runs well with fireEmitter

  • 0

I have a animated CAEmitterLayer with CAEmitterCell and the animation runs well with

 fireEmitter = (CAEmitterLayer*)self.layer; 
    fireEmitter.emitterPosition = CGPointMake(50, 50);
    fireEmitter.emitterSize = CGSizeMake(10, 10);

    CAEmitterCell* fire = [CAEmitterCell emitterCell];
    ...
    [fire setName:@"fire"];

CAKeyframeAnimation *anim = [CAKeyframeAnimation animationWithKeyPath:@"emitterPosition"];
    anim.path = theBezierPath.CGPath;
    anim.calculationMode = kCAAnimationCubicPaced;
    anim.repeatCount = HUGE_VALF;
    anim.duration = 12.0;
    [self.layer addAnimation:anim forKey:@"fire"];

my bezier path is closed and forms a “8” out of four position points.
with my timerFunction I try to get the position of the CAEmitterLayer every second. for that I use

-(CGPoint)getEmitterPosition
{
    return fireEmitter.emitterPosition;
}

in the emitter class and

CGPoint emitterPosition = [self.ParticleEmitterView getEmitterPosition];
NSLog(@"%f / %f", emitterPosition.y, emitterPosition.y);

from the timer function.

But when the animation is running the console spits out the same positio every call allthough the emitter is running over the screen.

why is that and how could I get the emitter position of an animated CAEmitterLayer/Cell?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-05T11:43:31+00:00Added an answer on June 5, 2026 at 11:43 am

    Have you tried querying the CAEmitterLayer‘s presentationLayer property and asking the resulting CALayer for its position? The presentation layer should give you access to the properties of the layer as they appear on the screen during the animation, while the emitter layer will give you the properties as they will be at the end of all current animations.

    This is due to the model-view separation inherent in Core Animation’s rendering architecture.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

If I have an animated gif that just runs a single animation, IE. it
I am trying to animate a CAEmitterLayer 's emitterPosition like this: CABasicAnimation *animation =
Many iOS setters have an animated variation, like setZoomScale: on UIScrollView , or, well,
I have a view controller with an MKMapView that calls [self.mapView setRegion:region animated:YES]; which
I have a CAEmitterLayer animated along a bezierPath and my CEEMitterCell particles are made
I have an animated gif. It's a progress bar and the animation is a
i have animated div in html. it is adding 1px to div in every
I have a animated GIF that I want as a watermark. How do I
I have an animated gif image that gets swapped to another animated gif onclick.
I have an animated gif placed on the button. It's animating ok (most of

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.