Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Use of vector4 to translate particles?
#2
Hi there!

Vector4 is used for performance reasons. Vectorization works on 2,4,8 or 16 operands (depending on the exact instruction set used), so having positions laid out as tuples of 4 operands allows for faster arithmetic operations in certain cases without the need to move things around in memory. The last component of the Vector4 (w) should be set to zero. For more info see: https://www.sciencedirect.com/topics/com...tiple-data

At first glance, the code you posted seems fine. What are the results you're getting with it?

Edit: particle data (positions, velocities, etc) is expressed in solver space, so make sure that A) solver space and world space match (by placing the solver at zero position, zero rotation, unit scale) or B) convert the platform position to solver space before adding it to the particle positions. See:
http://obi.virtualmethodstudio.com/tutor...icles.html

Quote:All properties are expressed in the solver's local space.
Reply


Messages In This Thread
Use of vector4 to translate particles? - by emz06 - 17-09-2020, 11:37 AM
RE: Use of vector4 to translate particles? - by josemendez - 17-09-2020, 01:01 PM