Download

3rd person shooting behavior weird when issuing move commands

Hi!

I hoped someone here could help me with something that bugs me since a long time.

My character (3rdperson) shoots in the direction I aim. But when I strafe left right while aiming the projectile will go into a different direction somewhere in the opposite of where im walking at.

It just does that one time the moment i turn. After one fail it correctly aims where it should.

heres how i handle spawning the projectile: http://i.imgur.com/UpGTiT6.jpg

[using “get look at rotation” instead of make rot from x doesnt solve the problem]

it seems like the socket location contains some rotation or sth… idk, i also dont know how to use unrotate in this case. i already tried to get socket rotation and unrotate the location and use that, but that gives some very wiered results…

The socket location is in her hand, collision is ruled out as issue (since it would destroy the projectile in her hand and make a hit sound and explode particles etc)

Idk how it could make it shoot so far off since the socket location is a point and the linetrace goes through the camera and the camera is never looking into this direction. It seems like if I issue a move command it thinks im turning the camera (with a huge rotation that I actually never do)

(ps: it also cant have much to do with the aim offset if u think that because this problem existed already before i implemented the offset and the socket was at the head of the character allthough the head turned obviously)

please can anyone help me on this issue?

i am sad :confused:

Not sure… if you are not getting a reply, it means it’s probably hard to tell what is going on with the info provided :stuck_out_tongue:

The problem starts from the trace though… based on that video, it clearly doesn’t trace at the aim location when strafing.

I wonder if it has something to do with the fact that because of where the socket is and how your character moves that socket during strafing, changes the initial direction of the projectile.

It should be using the direction of the cross-hair, but the initial location of the socket. Or something :slight_smile:

yes that is exactly what you can see in the bp.

I can provide more info if needed
Id even upload the char or sth, just need to know what assests u need and in what form.

If you can upload the character files then I’m sure I can find the problem.

An empty project with all the necessary character files/blueprints would be the fastests/ideal way, since I won’t have to setup anything :stuck_out_tongue:

Allright, ive migrated her and all dependancies into an empty level:

The only thing that is different from the original is the gamemmode wich i had to create new.

thx in advance already for trying to help.

Edit: this does not work for multiplayer. it works for the server if theres a 0, but not for other numbers, i figured 2 player match with a listen server i could put the number 1 for the second player and it should work, but it doesnt. “screen location” just doesnt work this way on servers, am i right?

i thought TK-master solved the problem, I quote the pm he sent me:

So in case the pic gets taken down someday.

Instead of [CAMERA] ----> [world location] and [world rotation] the following thig accurately returns vectors:

[get player controller] ---->> [get viewport size] booth numbers get divided by 2. Then [convert screen location to worldspace] plug in booth divided numbers from the worldlocation. now theres 2 vectors that work poroperly.

BIG THANKS!

€dit doesnt work in multiplayer :frowning:

I did not try multiplayer :stuck_out_tongue:
You can send (from the client to the server) the world location and direction parameters and then do the trace on the server.

ill do that for now, it seems though as if there should be better ways to do this.

thank you for the help!