# "Activate" function changes socket location

**URL:** <https://forums.unrealengine.com/t/activate-function-changes-socket-location/302896>\
**Category:** FX\
**Tags:** sockets, particle-systems, activate, spawn-actor, unreal-engine, question, Blueprint\
**Created:** [January 3, 2015, 1:50am UTC](https://forums.unrealengine.com/t/activate-function-changes-socket-location/302896 "2015-01-03T01:50:36Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![mjfabian](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@mjfabian](https://forums.unrealengine.com/u/mjfabian)\
**Post date:** [January 3, 2015, 1:50am UTC](https://forums.unrealengine.com/t/activate-function-changes-socket-location/302896/1 "2015-01-03T01:50:36Z")

</div>

I am trying to make a vehicle that can shoot while moving, along with a muzzleflash particle effect. I was originally using _Spawn Emitter at Location_ but the particles were not inheriting the velocity of the vehicle. I managed to get them to inherit the velocity by adding the muzzleflash effect to the component list of the vehicle blueprint (attached to a socket), and then activating it using a retriggerable delay while mouse button 1 is pressed.

 ![25437-component+list.png](https://d3kjluh73b9h9o.cloudfront.net/original/4X/f/b/4/fb4e8d3c3c3e2724d07704ffcc99bc76f52a871f.png)

 ![25436-blueprint.png](https://d3kjluh73b9h9o.cloudfront.net/original/4X/c/2/9/c29591fdf0fa2d37861402d59a99b3539006642a.png)

This works fine for the first shot but every subsequent bullet that spawns while mouse1 is held down is about 100 cm too high. If I print the socket location you can see it jump up by about 100 units. The particle effects spawn in the correct place–only the bullet itself is wrong. If I attach a sphere to the socket and make it visible in-game I don’t see it jumping at all. If I rapidly click mouse1, there is no issue. This problem only happens while _holding down_ mouse1. Getting rid of the Activate node fixes the bullets (but the particle effect obviously does not play).

 ![25438-bullet+bug.png](https://d3kjluh73b9h9o.cloudfront.net/original/4X/e/b/9/eb921acb003ac6c7622775735757c6ace5e04ea5.png)

I have tried using _Spawn Emitter Attached_ but it doesn’t seem to allow the particles to inherit velocity (or I haven’t figured out how). When using Spawn Emitter Attached, both the bullet and the muzzleflash particle effect spawn too high after the first shot, and the problem only starts until after I press a button associated with vehicle movement.

---

<div class="post-metadata">

**Author:** ![mjfabian](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@mjfabian](https://forums.unrealengine.com/u/mjfabian)\
**Post date:** [January 4, 2015, 4:03pm UTC](https://forums.unrealengine.com/t/activate-function-changes-socket-location/302896/2 "2015-01-04T16:03:47Z")

</div>

Okay I’m not sure if this is the “correct solution” but it seems to have solved my issue:

I read this answer about “activating” detaching child components: [https://answers.unrealengine.com/questions/37576/activating-physics-detaches-component.html](https://answers.unrealengine.com/questions/37576/activating-physics-detaches-component.html)

So, instead of adding the particle system directly to the root/mesh I added a PhysicsConstraint to the muzzle socket and then attached the particle system to that.

![25565-new+component+list.png](https://d3kjluh73b9h9o.cloudfront.net/original/4X/d/4/0/d406ad7a5899b0b431c71960ebaa66311a8986b3.png)
