We will be out of office from December 23th to January 7th. During this time we'll check the forums less often, we'll be back at full throttle soon. Take care, Merry Christmas!
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?
(13-09-2023, 05:57 PM)Renman3000 Wrote: 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?
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.
14-09-2023, 04:16 PM (This post was last modified: 14-09-2023, 04:42 PM by Renman3000.)
(14-09-2023, 07:27 AM)josemendez Wrote: 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
"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.
(14-09-2023, 04:16 PM)Renman3000 Wrote: 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.
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.
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,
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.
26-09-2023, 07:14 AM (This post was last modified: 26-09-2023, 07:20 AM by josemendez.)
(25-09-2023, 04:09 PM)Renman3000 Wrote: 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.
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.
26-09-2023, 05:17 PM (This post was last modified: 26-09-2023, 05:34 PM by Renman3000.)
(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.
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,
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?
(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
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