Hello! I have a script to move the player with the object they are standing on. However, I’ve noticed a strange inconsistency with CFrame:ToObjectSpace(cf). When swapping out a simple cf * CFrame:inverse() with this, something goes wrong and the character begins flying off.
Using cf * CFrame:inverse():
And using CFrame:ToObjectSpace(cf):
The reason I’m asking this is because the first method seems to cause drifting when standing still, most likely due to floating point error, so I want to swap it out with this. If anyone has any ideas as to why this inconsistency is here, please let me know!
inverse() and ToObjectSpace() arent static functions. they are methods, so they require a cframe thats already initialized. i think roblox will just uses a zeroed out cframe if you call methods like if they were static
also im pretty sure cframes are like matrices, so multiplication order matters. cf * inverse() is different from inverse() * cf
instead of CFrame:inverse() or CFrame:ToObjectSpace() it should be cf:inverse() and cf:ToObjectSpace() where “cf” is the cframe you want to get the inverse of, or turn another cframe into its object space