Make object moved with CFrames push unanchored objects

I plan on making my own character system, I tried learning how to use physics constraints, but they are quite limiting from what I know as I can’t make them have certain movements that would be much easier to do using scripts (let’s say a section where you’re tunneling through smooth curves, or you’re accelerating or decelerating constantly and must be achieved accurately).

While I’ve attempted to use scripts, the problem is that when I CFrame said objects, they don’t interact with unanchored objects, they may simply never collide even at low speeds.

I attempted using touched events to know when they touch and apply impulse, but even touched doesn’t work, I could also use spatial query but that’s more expensive.

I am unsure what I can do at this point, any help is appreciated. Thanks!

There’s not really a great way to do this. By setting CFrame values, you’re inherently skipping over physics. Physics updates also run at a relatively fixed interval, outside of script updates. If you want the objects to perform nicely within the physics engine, then you’re going to have to compromise and use physics constraints.

One “hack” would be to move your object with CFrame, but have an unanchored “physics part” outside of the model that locks onto the object using something like AlignPosition and AlignOrientation (and turning on their rigidity settings). This would essentially lock the part onto the object that you’re moving with CFrame, but the part would still be subject to the physics engine. There might be some adverse side effects in doing this (e.g. it might be 1 frame behind, or something like that).

1 Like

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