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

Particles depend on camera angle #6632

Open
LeXXik opened this issue May 27, 2024 · 3 comments
Open

Particles depend on camera angle #6632

LeXXik opened this issue May 27, 2024 · 3 comments

Comments

@LeXXik
Copy link
Contributor

LeXXik commented May 27, 2024

When particles in a particle system set to align to motion, they should only consider their velocity. However, the camera's angle is also included, making them rotate on camera rotation.

Repro: https://playcanvas.com/project/1223253/overview/particle-system-issue

2024-05-27.11-42-28.mp4
@kirelisaurimas
Copy link

I think we should add https://api.playcanvas.com/classes/Engine.ParticleSystemComponent.html#particleNormal
to that as well. you you set orientation to world there are something wrong with it. Please correct me if I am wrong, but this is not correct behavior. to reproduce it just rotate parent 180 degrees, and try play with world orientation particle normal parameters:

  1. setting parent to 180, then particle normal x = -1 and z = -1. You will notice that increasing particles normal x to lower value than -1 (for example -16) will actually effect the orientation.
  2. particle normal (1; 0; 0) and (1 ; 0 ; 0,0001) behavior is completely different when parent is rotated 180 degreess.
  3. rotate object -90 degrees and on particles try find values that would make particles go correct direction you will find that is impossible regardless of values. this assuming that particles looks like fish or arrows, so you could see particles easily.

It might be connected with orientation problems. or might be new ones.

@mvaligursky
Copy link
Contributor

Velocity is just a single vector. A quad needs to be aligned two two vectors, otherwise it could randomly rotate around the velocity. I think the other vector is related to the camera, so that the quad is visible by the camera. What else are you suggesting here @LeXXik ?

@LeXXik
Copy link
Contributor Author

LeXXik commented Jun 3, 2024

Hmm, to be honest I haven't studied the particle system implementation yet. There isn't anything else in addition to it. Just that the particles should maintain their orientation while in flight regardless of camera's angle. Can the particles not use camera vectors and use world up/forward instead when they are in the world space?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants