SetActorLocation does not work if the actor does not have any meshes [BUG]

Hello everyone,

Here is the steps to reproduce the bug:

  1. Create an actor (let’s say ActorX)
  2. Add a sphere collision as the root component
  3. Add a particle system under the sphere (root) component. (Attach a particle system as well. In my case, I used a particle system which has a mesh data)
  4. Create another actor (let’s say ActorY)
  5. In the BeginPlay function of the ActorY, spawn 25 ActorX and set their location where the player cannot see them. (Also save them in an array)
  6. When the player presses the left mouse button, fire a line trace function and save the hit location
  7. Set a spawned ActorX’s location as the hit location
  8. The location of the ActorX does not change

Here is the interesting part: if I add a static mesh component or a skeletal mesh component in ActorX, everything work perfectly. I can see the both the static mesh (or the skeletal mesh) and the particle system. Without any meshes, the actor’s location does not change or maybe the location is changed but the particle system does not follow the root component.

I simplified my problem here. What I am actually trying to do is creating an object pool. The object pool spawns 25 projectiles somewhere in the map, where the player cannot see them. When the player shoots the gun, I take a projectile from the pool and set its location, however, the projectile’s location does not change.

Is your actor mobility setup correctly (Moveable)? Can you move the Actors in Viewport while Playing (Eject with F8)

Since it is an actor, it is already movable, and yes, i can move the object while playing by ejecting

Can’t reproduce. Not doin 100% the way you do - but it works like expected !? Maybe post your Code for the Trace and handling of it.

Spawning actors works normally, no problem. However, when I try to change its location during the gameplay it does not change its location.

Also, there’s one more thing: I am doing all those logic in C++. Maybe in BP, there’s no problem.

I am also doing it during gameplay, have a look at the screenshot, it starts after a 5 sec delay. I haven’t tried it in C. If you share your code I can have a look over it.

Everything started to work now. I just added another emitter in the particle and now, I can change the location of the actor. Maybe, it was some kind of hot reload issue. Closing and opening the editor was the solution. I don’t know.

Nevertheless, thank you for you help.