Replicated actor spawns at 0,0,0 in case of collision

Hello, I have a really weird bug in my game. I think it’s easier to show it in a video but I’ll also try to explain it.

Video : - YouTube

As you can see it works most of the times, it shoots the projectile where you aim. The actor spawns ~200 units in front of you but in case it collides with the world the client sees at it was spawned at 0,0,0 (as you could see on the server, it exploded right in front of him) Any idea what kind of bug could it be? I’ll post some blueprint scripts if necessary but it has quite a lot of nodes associated with it.

Also, in case of 2 clients and the server, the 2nd client doesn’t see the fireballs that are bugged but can see the normal ones.
Video : - YouTube

Thanks in advance, Gabe

Try playing with your Collision Overrides on SpawnActor, are you using a Scene Component or an offset for the location?

Hello Dedrick, I tried the solution you said but it didn’t fix it, I’m spawning it with an offset, with a tricky one, im doing a trace from my camera where i aim then set a transform variable to point at it (substract the 2 value and convert the vector to rotation)
After that i just spawn the fireball with that transform (its done this way cause there are several other spells that require other means of spawning). on the pictures you will see the collisionhandling on default because i set it back after I tried.
Here are the blueprints : (bear with me xd, it looks like a mess but it is working fine… well except for this collision bug)

PlayerController

Character

Character

Cast Fireball (Parent : Cast Base)

Cast Base

No idea at all? :confused:

Have a branch that checks if your offset collides with any world objects and have it do a “cast failed” sequence if it is?

Does your even “Event Cast Spell” also need to be called on the server?

Ive had an issue in the past where I was getting the player, but the client player, not the server. So what happened was I was getting old or null variables. What eventually needed to be done was to call all events that needed a reference to the player on the server and this seemed to fix my issue.

If that doesn’t work, what I suggest would be to print out the results of each time to get or set the aim transform variable, and see where the issue is lying at what stage in the process. It sounds like the underlying code behind what you are trying to do works, however getting that back when spawning fire ball still has a few hiccups.