[Fixed] How to simulate the movement of a billboard

Hello ! I’m trying to simulate the behaviour of a billboard towards a player, but I have no idea how to capture exactly where the player is looking.

I have thought about using the TweenService, but in my opinion would not be a good idea and more a workaround.

Let’s imagine we have a variable orientationGoal(which will be the player Orientation) in a localscript

  • local orientationGoal = ?

But, I would like to make it smooth, with an equation :confused:

Now,we can have another variable that will be the current orientation of the part

  • local capturedOrientation = ?

The objective is to update every render this variable, using a simple RenderStepped event

I was imagining a lot but I don’t know really how to make this, help would be appreciated !

Why would you want to simulate it when you can just use the Billboard GUI? Are there things that the Billboard GUI can’t do to your own project?

Well, good question !

A billboard gui doesn’t have a smooth movement, since having that type of movement is the goal

What do you mean by not having smooth movement? Can you provide a video on what you are trying to achieve?

Well, I don’t know really how to explain…

In that video, the orientation of the billboard obviously changes, but it’s linear !

My objective is to make a part following the player camera orientation(like billboard guis) in a resonable speed but it’s smooth movement should be visible

I guess you could try making the part face the camera?
Just use tween service, heres a code on how to make the part face the camera

local camera = workspace.CurrentCamera
part.CFrame = CFrame.new(part.Position,camera.CFrame.Position)

I know its deprecated but it wont stop working anytime soon.

1 Like

Hello, I used another method for that smooth movement

Looks sexy by the way !

But I’m having another problem, and I can’t really solve something despite its simplicity

How can I lock the movement only the Y axis ? (green as indicated on the screenshot)image

Here’s my goal variable:
image

Check out the solution, its like a whole new method

2 Likes

That solution isn’t logic for my IQ, I must be idiot haha

Anyway thanks for your help!

1 Like