I have a SideViewCamera and when I click on a static mesh I want it to lerp position and scale towards the centre of the camera but I need a way to determine when it at the correct position and scale to take up the majority of the vertical or horizontal screen size.
Any suggestions on how to accomplish this. I have tried to having a mesh attached to the camera but it doesnt feel quite right
We have this in a few projects. Many ways to do it, but here’s what we did:
PlayerController has multiple “player states” it can be in, like Walking, Paused, or Inspecting, all deterministic (one at a time)
Inspecting is a player state
During Inspecting state, player movement is stopped, and the inspected object zooms to a named socket location on the player character
The named sockets to zoom to are on a mesh attached to the player’s current character, which is centered at the character’s camera
the inspected object simultaneously lerps toward the socket in front of the camera, and shrinks to a designated amount (there is no choice but to set this shrink value up per-object)
By some key or button press, the player exits Inspection mode, and the inspected object lerps back to its original location
we limited “Inspected objects” to actors only, components are doable as well, but will require different handling
Uhh yeah that’s a lot and it takes some thought to implement, and details will certainly vary according to your game framework. Especially the UI stuff.