I have a sphere trigger that detects objects that pass through it. How would I create a copy of any object that has collided with the trigger in the position where it collided?
For example, if a rolling ball were to pass the trigger, a copy of that ball would be created where it first hit the trigger. The original ball would keep rolling, but the physics and collision of the copy would be disabled so it doesn’t move.
This would have to work with any object that has passed the trigger.
Well, if you’re using the base things from the starter kit, that might be the problem there. I think those are all set through the level.
Try making one yourself and trying that out instead- this could be just that the things in the starter kit were not set up with those in mind.
Give that a try and let us know!
Otherwise you could try having a new actor type that’s just a static mesh, Spawn THAT, then off other actor, get component, static mesh, set static mesh off the return value for the new spawn. But that would only take ONE and if there are several that poses another problem.
I imported an asset, but it still won’t get the static mesh of it when it’s copied.
I did however try to see what happens if you copy a blueprint that has a mesh inside it and it does work. But, the problem that I see with that is that I’m not able to get a reference to the mesh that is a part of that copied blueprint (can’t reference the physics). Also, if there was a way to reference it, I believe that it would affect all instances of it including the original, which it isn’t what I want.
If it’s possible I would like to figure out how to copy an object without relying on it being a part of a blueprint.