Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Help  problem of particle position
#4
(23-12-2020, 03:04 PM)FZMv587 Wrote: Hi,it ‘s me
Is the particle's world position are calculated by   rope.gameObject.transform?
Because I use particleAttachment connect a particle group to the rope self, i move rope's position to move particles

set like this:
Code:
rope.GetComponents<ObiParticleAttachment>()[0].target = rope.gameObject.transform;
rope.GetComponents<ObiParticleAttachment>()[0].particleGroup = blueprint.groups[0];
move like this:
Code:
Vector3 to_new_position = new Vector3(0.0f, 0.0f, 1.0f);
rope.gameObject.transform.Translate(to_new_position, Space.World);

Particles are simulated in solver space. To convert to world-space, they're transformed using the solver's transform.

When you attach a particle to a target transform, the particle position at the time of setting the attachment's target/particleGroup is stored expressed in the target's local space. At runtime, this target-space position is converted to solver space and used to set the particle's position. Hope this makes sense!
Reply


Messages In This Thread
problem of particle position - by FZMv587 - 23-12-2020, 02:11 PM
RE: problem of particle position - by josemendez - 23-12-2020, 02:42 PM
RE: problem of particle position - by FZMv587 - 23-12-2020, 03:04 PM
RE: problem of particle position - by josemendez - 23-12-2020, 04:38 PM