I’m having this problem where the object comes back to the table in a totally wrong rotation. I think it has to do with the BeginPlay Event. Is there any way to get the object back to exactly the way it was after I stop inspecting?
You need to get world transform for your actor and where you want it to move, get the distance and move your to that relative position.
For example:
In that video above I moved the objects in from of the camera (80%) the way from the object to the camera → I got world location of camera component and the actor I want to move, subtracted them * .8 and used that value as the target relative location.
To “place them back” you need to have stored the original world position and subtract it from the current world position and set that as your target location.
I’m so tired. I think i’m gonna leave this for tomorrow. I think I’m going to redo it too, you know? I was thinking about making the system of picking up items in one place and inspecting, like the mechanics of “Gone home”, do you know the game?
I was thinking of making a simple system like this but in Blueprint (I’m learning C++ yet):
Do you have any idea how it could be? a very simple one without even having to hold the object and take it with you. The object should stay in one place and when I get close, I press a button, the object comes to me, I inspect and put it back in the same position, no matter where I picked up the object (Behind the table, to the right , left) all this using Linetracebychannel, you know? Very simple. Do you know a very simple way to do it? Hehehe
More or less how it goes. The focuse on object and rotate takes a bit more time but it’s pretty much the same.
The trick is to disable physics, collision, reset the SM to it’s parent inside the blueprint, reset relative transform for the component and finally attach to character (to a component placed where you want it to be held). This will snap the object to view like in my video.
When throwing the object, you need to reverse everything then add a impulse node with the camera’s forward vector * desired force to throw it forward.
Get those two set up and addind the inspect mechanic will be easy.
I’ll share the nodes tomorrow. Need to clean up a bit. lol
Thank you very much for your help. You are very kind. I am learning and working on a small project. I’m enjoying tinkering with blueprints. They are a differential in the job market and that makes me very excited.
I’m sure this could work. Why a timeline over move node? From the looks of it the actors you want to inspect are not simulating physics. You want to throw them after or place them back where you found them?
Would be cool to see it in action though. Missing that part to attach → if attached then can inspect → detach.
I’m sure this could work. Why a timeline on the motion node? From looks to the actors you want to inspect are not simulating physics. Do you want to play them later or put them back where you found them? Hey. I want to put them back. That way it works.