Rotating mesh based on camera view direction

Hi everyone,

I’m currently creating a simple tilt maze game where you move a ball by tilting a platform. For this I’ve set the ball center as the point to rotate around. Thanks to another question here, I managed to handle the platform rotation like this.

And here comes my problem…Currently, the platform always rotates based on its world direction. So tilting it forward, will always tilt it in same direction even if I turn my camera around 90 degrees for example.
What I want is the platform to always rotate based on the cameras view direction.
So if I turn the camera around X degrees, the platforms new “forward” should become the direction at X degrees.

Any ideas on how I could add my camera to this?

use look at function like this:

this will give you a rotator aligned with the camera from the location of the object

you can use with any objects. not just the camera…it just points from object A to object B

2 Likes

Thanks for your reply!
Wouldn’t this turn the platform itself into the direction the camera is facing?
What I need is to somehow turn the rotator which tilts the platform around X degrees so that the platform tilt directions are the same as the input directions.