i don’t know how to describe it right, but i try as good as i can =)
I´m working on a ARKit-App where the user can place Meshes into the world, he can also rotate and scale the mesh.
And here come my problem, i got it all working but my problem is that every time the user touches with two fingers on the iPad-Screen the rotation and scaling
reset´s to the default rotation/scale. What i like to have is that the rotation got stored and odes NOT reset again and again.
I used the “Ultimate Touch Components” here from the Asset-Store to control the touch inputs.
Any ideas ?
Make the three transform variables. The nodes in the first upper half of the image should be activated right at the end of any nodes that come right before the upcoming input. The touch event I used is a custom event only for the sake for this example, you should use the proper event for a touch device (I never worked on UE4 for touch devices)
This will store the transforms before the touch and input them again directly before the touch. So even if the actor is rotated or sized at the time of touch, this will revert any wrongs done.
Million thanxx for your support, but i have a few more questions if you don’t mind.
The situation is like this:
I use ARKit, i spawn my 3D-Meshes into the world by double-tap, the 3D-Mesh gets its position
in relation to the ARCamera. ( i attached a screenshot how i do it)
After i spawned the mesh, i place the Mesh once again by a double-tap, so if i move in the world i be able to place my mesh
somewhere else in the real world.
After all the above, i like to rotate and scale the mesh and keep the data so that f.e. the scale will be stored and does
not reset every time i touch the mesh.
You are welcome. If you actor scale is resetting directly after a touch event is done, then you have to restore the scale directly after the touch event from a variable that you should set before that.
I see in your second image that at the end of the code you set actor transform for the actor. Still, it seems you are setting location only from the location of the touch (correct me if I am wrong). If right after this the reset is done, then you have to set actor transform for scale right after the touch event and use scale variable set earlier to set the correct scale.