I was experimenting around in studio after getting inspired by games such as cart ride for corndog making 3D characters into 2D sprites/projections using BillboardGui for their 1995 style and Fallen Aces
It went pretty smooth up until I playtested with my alt account and noticed that it’s offset/lower than my main account’s character
I came to the conclusion that it’s the accessories, specifically from the real Character (not the one in the BillboardGui)
There are 2 characters in my game, the real one and the fake one in the BillboardGui (which is animated/scripted), deleting the hat from the fake one doesn’t do anything but deleting the hat from the real one offsets it
I checked the pivot position from the real character and it wasn’t changed after removing the hat
The code changes the CFrame of the fake character to match the real character’s rotation (first line)
The viewport’s camera CFrame is set to the current player’s camera rotation with a lookAt that’s offset by 9 studs pointing towards the character, which basically mimicks what the real camera should see with 3D characters (keeping in mind it’s separate Billboards so it’s all local to each Billboard)
I suspect that it has something to do with :GetPivot() but I don’t know any other alternatives for my case
Code:
FakeCharacter:PivotTo(Character:GetPivot().Rotation)
Camera.CFrame = workspace.CurrentCamera.CFrame.Rotation * CFrame.lookAt(FakeCharacter.PrimaryPart.Position + Vector3.new(0,0,9),FakeCharacter.PrimaryPart.Position)