Is there a way to use AlignPosition and have it sort of bind to a part?

You can write your topic however you want, but you need to answer these questions:

  1. What do you want to achieve? Keep it simple and clear!
    Have it so the part affected by AlignPosition is sort of binded to the attachment it is going towards (welded but not), but still have the effect of not being able to go through parts.

  2. What is the issue? Include screenshots / videos if possible!
    The part is smooth towards the main attachment which doesn’t work with my VR game’s immersion and makes it feel unnatural.

  3. What solutions have you tried so far? Did you look for solutions on the Developer Hub?
    I have tried making a script that moved the part towards the other attachment but it would obviously not use the factor of not being able to go through parts.

It would be helpful if somebody were to point me in the direction of how to fix this issue. By the way I have tried changing the properties because I feel like somebody is going to ask that.

So you want a lerping effect or a rigid effect?

And is the main attachment out of the part or in the part?

So what I would like is for it to be connected to the part as in like a weld but still be able to have the collisions, for example, There’s a part in the way of the part that is moving (the AlignPosition part) and it won’t go through but whilst the attachment for the AlignPosition moves towards the wall it is directly on the attachment without any offset. Also, the main attachment (the attachment that the other attachment moves towards is not in the part). Let me get a screenshot of it.

Yes but what movement, rigid or lerping because I don’t know if you want it to be rigid or not.

I want it to be rigid. (random text because minimum text)

Ok, a welding like thing. You would want to position the main attachment not inside of the part but the direction you want. Before you move it ray cast whats in the directions way and if theres something in the way don’t probably move the part. Also AlignPosition gives more of a lerping movement than rigid if you don’t tamper with the other settings. If AlignPosition is not working as you want it then use the old BodyPosition but its deprecated is its not going to work for the long-term of your game. If you want 100% rigid then use the good old .CFrame property.

I thought of using raycasting but I didn’t want to use it at first so I thought of coming here, but obviously it’s the right option. Also, a little sub-question, I use BodyVelocity right now for movement, what would the alternative be as it is deprecated?

It would be LinearVelocity, its annoying that you have to use Attachments. :anger:

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.