Need help to fix broken bullet system

Hello guys, i have a problem, in my game i have a gun, gun has a muzzle, I need the bullet to spawn from the muzzle, it works correctly only when i tap shoot button many times, but if i hold the button, the muzzle returns to location like if it in editor, i dont know how it works, because i dont change muzzle transform, help pls with this, thanks in advance

alt text

on last picture the player is turned to -180 degrees, but print string returns zero rotation, it impossible because spawned gun is attached to player and become a child to player, just like muzzle is child to gun, so if player turn to -180 deg then muzzle must turn -180, but if hold the button it returns to zero rotation and different location then actual muzzle

I don’t know exaclty what the problem is, but I see two things that might need attention:

  1. Get all actors of class on tick!? How many are there? You don’t need to cast, because it’s already the right class of object ( hence the blue warning ). Can you just get it once and set the variable?

  2. Here

It will open the gate, then call 1 in the seq, and not wait for any time before calling 2. Delay is a latency node ( hence the little clock in the corner ). That means execution carries on, the system will not wait for it.

Ok, the first comment i fixed, thanks, but i dont understand second one, my knowledge of english is not enough to understand this, can you rephrase the question pls?)

I know how delay works, I dont understand what kind of mistake I made in this code.

Sorry :slight_smile:

The sequence node won’t wait for the delay.

The moment pin 1 has started running, pin 2 will run, and the delay will have no effect.

More this kind of thing

But I also suspect you’ll a DoOnce in there somewhere too.

aaa, i unterstood you, I thought you about another sequence

I narrowed my search down to this function

The problem in muzzle scene or in smt else, i tried to change scene to static mesh, all kinds collisions but in print string always stay 0 0 0

hmmm, doesn’t make sense…


It dont casting at all

Is it casting?!

Ok. with variable it starts work, but what to do with the location

I just switched pre physics

to during physics and it starts work