Boost Speed of Particle Group? - Printable Version +- Obi Official Forum (https://obi.virtualmethodstudio.com/forum) +-- Forum: Obi Users Category (https://obi.virtualmethodstudio.com/forum/forum-1.html) +--- Forum: Obi Rope (https://obi.virtualmethodstudio.com/forum/forum-4.html) +--- Thread: Boost Speed of Particle Group? (/thread-3997.html) |
Boost Speed of Particle Group? - Renman3000 - 13-09-2023 Hi there, I have an issue in that I have ropes attached to the player and all is well, however, at a certain point in the game I boost the player's speed. At this point a Particle Attachment Group is not rendering in step with the target. How can I boost the speed of the group, tracking the target? RE: Boost Speed of Particle Group? - josemendez - 14-09-2023 (13-09-2023, 05:57 PM)Renman3000 Wrote: Hi there, Hi! Attachment groups don't have a "speed" per se: they just move the particle(s) to the position on the target they're attached to. If both positions don't match, it means the order in which things are updated is not correct (typically, that the target is moved after the attachment is been updated). Also, make sure that your interpolation settings are the same for your target rigidbody and the Obi Solver. Interpolation always introduces a 1-frame delay, so if your ropes are interpolated but the target transforms are not, you'll see a noticeable gap at the point where they attach. let me know if you need further help, kind regards RE: Boost Speed of Particle Group? - Renman3000 - 14-09-2023 (14-09-2023, 07:27 AM)josemendez Wrote: Hi! "make sure that your interpolation settings are the same for your target rigidbody and the Obi Solver." So, I am using FixedUpdate, and a certain step value to move the ridgidbody via AddFroce. This works great, but as mentioned there is a time when I quadriple the player speed. It is here I see issue. Some background, the issue is at the root. The root is a transform that is a child to the rigidbody. The rope, has a particle attachment where the root is the target. So, when you say match the interpolation, exactly what should I be looking at? Thank you EDIT: So actually I double checked my set up. I have a rigidbody which I move via rigidbody.velocity. And I have secondary transform tf_rndrs, which is parent to root. This second transform follows the rigidbody via position.Lerp() And agian the root, (target transform) is a child of tf_rndrs. Not sure if this makes any differnce. Thanks RE: Boost Speed of Particle Group? - josemendez - 18-09-2023 (14-09-2023, 04:16 PM)Renman3000 Wrote: So, when you say match the interpolation, exactly what should I be looking at? ObiSolver.interpolation and Rigidbody.interpolation should have the same value. (14-09-2023, 04:16 PM)Renman3000 Wrote: So actually I double checked my set up. Not really. I suspect your ObiSolver has interpolation enabled but your Rigidbody doesn't, this will create a 1-frame delay between the position of the rope and the position of the rigidbody, which becomes larger (and more noticeable) the faster they move. kind regards, RE: Boost Speed of Particle Group? - Renman3000 - 25-09-2023 (18-09-2023, 06:26 AM)josemendez Wrote: ObiSolver.interpolation and Rigidbody.interpolation should have the same value. Hi Thanks, So I am still running into the same issue. I have toggled the ObiSolver and the Rigidbody to Inerpolate and None, also adjusted the ObiSolver FixedUpdate Substeps, no setting is making any impact. Earlier (in another thread), you had shown me how to track a transform to the position of a Particle Group Attachment Target, more accurately, however, this is the reverse. I need to have the particle (particle group) move to a transform, more accurately. Sorry, but really need to solve this. Thank you. RE: Boost Speed of Particle Group? - josemendez - 26-09-2023 (25-09-2023, 04:09 PM)Renman3000 Wrote: Hi Thanks, Substeps don't have any impact on this, so adjusting them will have no effect. In case interpolation is not the problem, this means the target object is getting updated after the solver. For instance, you might be using ObiFixedUpdater instead of ObiLateFixedUpdater. (25-09-2023, 04:09 PM)Renman3000 Wrote: Earlier (in another thread), you had shown me how to track a transform to the position of a Particle Group Attachment Target, more accurately, however, this is the reverse. I need to have the particle (particle group) move to a transform, more accurately. This kind of issue typically stems from rigidbodies and solvers being updated differently (either because state interpolation settings are different, or because of update order issues). If you can't find the culprit you have one last resort which is to force the renderable position of the particles at the very end of each frame. This is just a cosmetic "hack" and isn't physically accurate, but will solve your issue. Edit: I've modified ObiParticleAttachment so that it forces the renderable position of the particle at the end of each frame. You can find the modified version attached to this post. kind regards, RE: Boost Speed of Particle Group? - Renman3000 - 26-09-2023 (26-09-2023, 07:14 AM)josemendez Wrote: Substeps don't have any impact on this, so adjusting them will have no effect. In case interpolation is not the problem, this means the target object is getting updated after the solver. For instance, you might be using ObiFixedUpdater instead of ObiLateFixedUpdater. Thank you kindly, In regards to the script update. I copy and pasted it in, but now has an error. I looked, it appears the new script is of MonoBehavior while the original is an Editor? Thanks again. RE: Boost Speed of Particle Group? - josemendez - 27-09-2023 (26-09-2023, 05:17 PM)Renman3000 Wrote: I copy and pasted it in, but now has an error. I looked, it appears the new script is of MonoBehavior while the original is an Editor? Hi, That's not the case, ObiParticleAttachment is a MonoBehaviour. Seems like you're replaced another script, possibly ObiParticleAttachmentEditor which is indeed an Editor class. Reinstall Obi and replace ObiParticleAttachment only. The path to the file is Obi/Scripts/Common/Utils/ObiParticleAttachment.cs kind regards, RE: Boost Speed of Particle Group? - Renman3000 - 27-09-2023 (27-09-2023, 06:08 AM)josemendez Wrote: Hi, Amazing! Looks great! Thanks kindly. |