Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Help  Setting the mass of a particle trough code...
#1
Pregunta 
Code:
       rope.invMasses[0] = 10;

However this will make the rope segment be 0.11 mass.
How is the mass beeing calculated here?
where 1 = 1 mass but 10 is 0.11
Reply
#2
(19-11-2018, 04:40 PM)imtehQ Wrote:
Code:
       rope.invMasses[0] = 10;

However this will make the rope segment be 0.11 mass.
How is the mass beeing calculated here?
where 1 = 1 mass but 10 is 0.11

as the name (inverse mass) implies, this is 1/mass.

It is a common optimization in engines to work with inverse mass instead of mass, as many equations involve dividing by the mass.
Reply
#3
(20-11-2018, 08:13 AM)josemendez Wrote: as the name (inverse mass) implies, this is 1/mass.

It is a common optimization in engines to work with inverse mass instead of mass, as many equations involve dividing by the mass.

So you do it before as to not calculate it later, smart.

Thanks for the info.
Reply