Levers, dials and interactive props

Hi. I’m new to UE but not to game dev or development in general.
I want to achieve a panel where player in first view could rotate, push and pull props sliding a touch interface(mobile). The programing part is not that difficult(I have done some trials already) but the tricky part is how to model the system in UE. How this is usally done?

My first attempt:
Created several StaticMeshActors and created a stateful blueprint for them. It works as expected but the only problem is that no matter where you touch prop reacts. And prop should only react if initial touch was on the prop. I have seen people doing collision simulation and other things for detecting what is under mouse click/touch but my gut says this would be suboptimal.

Second attempt:
Created pawn blueprint with the StaticMesh in it. Interactivity doesn’t work at all until you “posses” the pawn and even at that time even thought interactivity works camera moves inside the static mesh. It looks like this is more for implementing cars or ships in MMOs.

Is there anything for UE like event delegation? What structure of components should I create? Should I put the logic for rotating the props into its own components or should I put this in a higher level like game controller?

Personally, I liked the component-based interaction system.

It has separate components for “pressing”, “grabbing”, “rotating”, etc.
You simply add a component to an actor, and you can add logic to the component’s delegates that will be triggered when you respectively click, pickup, or rotate the actor (or parts of it, depending on the settings).

You need to create a common interface for the components, which will be called from the character when the screen is pressed. Next comes the “interception of control” of the components depending on its type.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.