Possible to loop position with Tween in object space while also moving object in world space?

Whoa, that’s some next level thinking. I haven’t incorporated the idea yet, but it looks like what I was hoping for when I posed the question. Thank you so much for weighing in on this.

1 Like

Having complete knowledge of how CFrames work is essential to having any sort of customized movement that is relative to something else, which is basically what the difference is between local space and world space.
Vector3s only allow for moving parts in global space, while CFrames have a built-in function to convert between the two, that being the CFrame:Inverse method and the CFrame by itself.
I recommend you research it, as it could take you to the next level in… positional logic, I guess?

2 Likes

Wow I never thought of that. Well done. :grinning:

This looks similar to the method for tweening models using a virtual CFrame value.

I’m glad this problem got solved, because it was annoying me not knowing how you could do this.

2 Likes

Yeah, well done for sure. I hadn’t heard of virtual CFrame values before now either (so much ground left to cover). I had stored CFrames and tweens in my mind as mutually exclusive options, I’m pretty sure goldenstein64’s idea would never had occurred to me.

It may turn out that just using CFrames for these kinds of things is better for performance (but maybe not with the event trigger idea and translations that happen intermittently), and it’s probably not appropriate for animations that are much more complicated. On the other hand, it’s very elegant, easy to write and understand, and may be a practicable solution for animators who aren’t the type to try and implement something with just CFrames.

I’m really happy you all chose to engage in this discussion and allow for this idea to get some exposure. It may be my new favorite tool: so many avenues to explore here. Thanks again.

[And, yes, I’ll definitely research CFrames a bit deeper than I had. Combining the CFrame+tween idea with XAXA’s suggestion gives me some ideas about how to do some things I had dismissed out-of-hand as being too much trouble. A better grasp of CFrames will be helpful there.]

1 Like

I mean I had heard of virtual CFrames, and used them, but I never thought of using them for this. Solution we’ll deserved.

2 Likes