23-12-2020, 04:38 PM
(This post was last modified: 23-12-2020, 04:39 PM by josemendez.)
(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:
move like this:Code:rope.GetComponents<ObiParticleAttachment>()[0].target = rope.gameObject.transform;
rope.GetComponents<ObiParticleAttachment>()[0].particleGroup = blueprint.groups[0];
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!