Adding interaction to Inspect system

Hello all,
I’ve made an inspect system where you could easily pick up an object and rotate it on-screen like in many horror games. And when you click again, the object goes back to its original position.
However, I’m having a problem implementing a system where you could:

  • first click on the object in inspect
  • A mouse cursor appears and if I click on particular place of the object, I’d like to spawn an animation. The problem is, I’m making the game True FPS and the linetrace always goes from the camera.
    Example: You find a small box which is a puzzle. So, you click on it and it goes to the screen for Inspect (I made that). The problem: The ability to click on particular pieces of this puzzle to make them move or rotate and etc. The linetrace always goes from camera, not at mouse position.

Can anyone point me in the right direction?

It sounds like your not using an invintory system and are simply moving the actor/item closer to the players viewport is that correct? At any rate you could create an invisible object to be moved on the appropriate planes (x y) and set it’s position based on {get mouse position on viewport} function and call a line trace from said object in the appropriate direction towards desired object

Yes, I’m not using inventory system. Simply I built an inspect system for particular objects and they are moved closer to the camera on click. And when they come closer, you can rotate them on all axis.