Problem with adding impulse

I move far from the world origin

How far? Could be floating point error.


Also, could you test it by holding still rather than while moving (in case you were) - see if that makes any difference?

Hi everyone, i’m new to Unreal Engine and to BPs.

I’m trying to spawn a BP (fireball) on mouse pressed, in front of my char using a Scene object in the ThirdPersonCharacterBP (spawner), and on mouse release I add an impulse to propel the ball in the direction of the mouse. I’ve got almost all figured out, my only problem is that if I move far from the world origin the trajectory of the ball keeps veering off course. I’ve been trying to figure out what’s wrong with no luck. I still don’t fully understand vectors and forwards.

Any help would be great. thank you!

ThirdPersonBP

FindTarget_method

Fireball_BP

If I stand on the world origin, all shoots just deviate slightly up, if I move further away from the wO, the shots steer to the right or left depending on wich quadrant I am relative to the wO. I don’t know what’s wrong. but the traceLines appears correct, all the values after debug seems to indicate that the orb would go to the point (indictated by the traceLine), but somewhere along the way it seems that the rotations gets altered and the orb drifts. been at this for 2 days.

shot from w0 (blue light represents 0,0,0)

shot from away (blue light = 0,0,0)

My idea was to use the center point from the camera to get the destination v3 Point, and then rotate the orb (that’s already spawned) to lookAt it and apply the force in that same direction to shoot it.

but it seems something’s not willing to work my way.

Tried that with no change. trajectory still all funky

If you believe the camera is the culprit, you could try this instead in Find Target Point:

344793-screenshot-1.png