Hi, so for my game, there’s object movement mechanics. Basically, when the player goes up to an object and continues to move in that direction, the object will push in the direction the player is going.
I’ve used CFrame for this, as it was the most reliable method I found, because I needed to use Region3s to determine if there would be any object collisions if the player were to push that object.
The only caveat, is that this creates a lot of stutter almost, it isn’t perfectly smooth. I’ve tried stuff like tweening or animating it to smoothly reach the end goal, but that really didn’t work out and it caused some delay issues.
I’ve tried welding the object to the player, and that worked really really well. However, sometimes the object would rotate a few degrees in some direction and for the type of game I’m working on, I can’t have that happen at all.
One idea I was thinking of was, in like a RenderStepped event or something, to see if the player is looking at an object and if so, attach the object by CFraming the object in front of the player every frame for as long as they’re pushing the object. This was probably one of the closest ideas I’ve had, but I can’t seem to figure out how to come up with a CFrame to set to the object.
Basically the problem I’m having, is I want the object to remain in whatever position that it’s in when the player gets close enough to it, but I also want this object to start moving with the player, based on the position of something like the HumanoidRootPart so the object moves smoothly, not instantly, if that makes any sense at all.
I can clarify if needed, but this is an overview of what I’ve been trying to achieve, and I really feel like that last solution has potential, but I just can’t figure out how to come up with the right offset to use, so the object keeps its starting position, but also moves with the player’s movement.
Thanks so much for reading this long and wordy post.