Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

Change ViewportFrame Camera rotation based on part?

Asked by 2 years ago

Ok hear me out.

My Goal:

A building system which shows rotated parts inside of a viewport frame as display

The problem I am having with this system is that once the player changes

workspace.CurrentCamera

the part does not correctly display the proper rotation to that CurrentCamera.

To be more specific a Part that is 0,90,0 in CFrame.Angles

will only be 0, 90, 0 if the Players Current Camera is rotated at 0,0,0

once the Players current camera changes the part will no longer be accurate

I want to know how I can make it relative to the Camera so that the rotations shown inside of the ViewportFrame will match the rotation of the CurrentCamera.

I have already tried setting the Parts CFrame to relative of the current Camera's LookVector and CFrame.

However the problem with this was that it copied the exact Rotation of the Camera so that the Part followed the Camera's rotation

I want the part to follow its own rotation however still make it so that it is relative to the Camera so that even if the Players CurrentCamera's rotation changes

It maintains its rotation relative to the camera

0
what do you mean by changes the current camera? Puppynniko 1059 — 2y
0
You know the rotation of the current camera rotates as the palyer moves its character. that wont allign the camera with the part int he viewport frame Overseer_Prince 188 — 2y

Answer this question