CCParticleSystem имеет свойство positionType , с помощью которого вы можете изменять поведение положения испускаемых частиц.
Перечисление определяется следующим образом:
typedef enum {
/** Living particles are attached to the world and are unaffected by emitter repositioning. */
kCCPositionTypeFree,
/** Living particles are attached to the world but will follow the emitter repositioning.
Use case: Attach an emitter to an sprite, and you want that the emitter follows the sprite.
*/
kCCPositionTypeRelative,
/** Living particles are attached to the emitter and are translated along with it. */
kCCPositionTypeGrouped,
}tCCPositionType;
Вы хотите, чтобы ваши частицы были расположены относительно или сгруппированы.Между ними есть небольшая разница, просто попробуйте одну, а затем другую, чтобы увидеть, какой вариант лучше подходит для вашего варианта использования.
particleSystem.positionType = kCCPositionTypeRelative;
particleSystem.positionType = kCCPositionTypeGrouped;
Кстати, это одна из немногих настроек, которые нельзя изменить вИнструмент ParticleDesigner.