( skip to the TLDRs if you just want the problems )
This will take a moment to explain so bear with me here:
So I am trying to make this minecart system, basically puts players in minecarts and moves the minecarts around using
BodyGyro, works pretty well from the early testing I’ve done on it.
The thing is though I’m trying to make the minecarts rotate towards set points along a railway so they’ll always face the right way and thus travel in a straight line without much issue, however, this proves to be much trickier than I thought because in order to use something like
CFrame.lookAt(), two position values are needed, the looking part’s position and the part-being-looked-at’s position.
The thing is though, I need to use
CFrame in order to retain movement with the minecarts because of them using physics to move ( so I can do some extra physics-y things later ).
And here’s where the problem comes in:
The first position in any of the rotation-based
CFrame operations will move the minecarts to that position as well as rotating towards the target, what’s problematic about this is that the minecarts need to NOT do that otherwise it’ll just tether them in place basically.
TLDR 1: any CFrame rotation function I try to use just ends up tethering a physics object in place
These circled parts here are used to give the minecarts positions to look at
This is what currently happens:
I say it’s tethered because it’s technically still able to move but it’s generally tied to one spot ( no, this doesn’t seem to have anything to do with the movement script of the minecart unfortunately ).
And this is sort of a mockup using the Move and Transform tools of how I’m somewhat wanting it to look:
Basically the minecart should look towards the part while still continuing forward with physics.
( granted it reaching the other side and turning back around wouldn’t look like that in actual application though )
TLDR 2: Ultimately, you have two parts, A and B, how do you make Part A look at Part B without changing the actual position of Part A, thus messing up Part A’s physics movements?
Edit: Oh, just incase if anyone was wondering, no, there are no errors in the output for anything related to this problem.