Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix particle pos in worldSpace on Free Mode #5320

Merged
merged 1 commit into from Sep 3, 2019

Conversation

@PPpro
Copy link
Contributor

@PPpro PPpro commented Sep 3, 2019

Re: cocos-creator/2d-tasks#1708

changeLog:

  • 修复 particleSystem Free 模式下,坐标计算错误的问题
@PPpro PPpro force-pushed the 2.1.3_particle branch from d8b6bfb to 867f051 Sep 3, 2019
newPos.set(particle.pos);
newPos.subSelf(diff);
diff.set(particle.pos);
diff.negSelf(); // Unify direction with other positionType
Copy link
Contributor Author

@PPpro PPpro Sep 3, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

修复 Free 模式下,加速度方向跟其他模式相反的问题

Loading

Copy link
Contributor

@2youyou2 2youyou2 Sep 3, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

原来的计算跟 relative 一样是 newPos.set(particle.pos); 为什么会有问题呢?

Loading

Copy link
Contributor Author

@PPpro PPpro Sep 3, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

tpb 是临时变量,需要重置

Loading

@PPpro PPpro force-pushed the 2.1.3_particle branch from 867f051 to 19051cc Sep 3, 2019
@2youyou2 2youyou2 merged commit 60d280b into cocos-creator:v2.1.3 Sep 3, 2019
1 check passed
Loading
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

2 participants