Copy runtime objects to product viewer

Is it possible to copy objects in runtime when the game is launched on the product viewer?

If it can be done, is there any documentation where I can see how?

Thanks!

Daniele

Hello Daniele,

Can you describe more what you mean by copying objects.
You can spawn new actors in scene, you can duplicate actors.
If you want them to be managed as interactive objects you will have to do the necessary modification in the ProductViewer_collector instance.
Have a look at what the Productviewer_collector does on BeginPlay:

  • adding tags to actors
  • re attaching them
  • storing initial transform
  • etc.

Hi Flavien,
Thanks a lot for the answer.
We know the functionality of the productviewer_collector, but I don’t think it’s already programmed on the default one.
I’ll explain well what I need.

taking the example of the product viewer I would like to be able to copy the sphere while the game is running.
So for example you can have 10 balls instead of one during the game.
How do I do it inside unreal by pressing ALT + drag, but do it inside the game.

Moreover it would be interesting to constrain their movement only on the X and Y axes without making them move on Z, from their original starting position.

I attach image.
If the answer is too expensive, it’s also okay to tell me where I can study to get this result.

Thanks a lot.

Daniele

Hello,
I do not have a step by step guide to provide to you, but roughly you would have to:

  • In the ProductViewer_Mouse_Pawn add a function to capture mouse clic + ALT. On clic + ALT you would have to detect what is the hit model, duplicate the object, and put the duplicated as the new hit model. look at “Set Orbit / Move Actor”
  • Then you would move your duplicated model as you would normally do with the translate actor function. You might want to lock the new position of your object on the Z axis by only updating its x and y coordinates. c.f. TranslateActor in ProductViewer_Base_Pawn.

Thank you very much Flavien, I will try to do as you say!

Thanks again!

Daniele