mysterymagination / ryddelmyst

cutethulhu meets Castlevania on the battlefields of Final Fantasy Tactics!
GNU General Public License v3.0
2 stars 0 forks source link

Picking up small object is difficult #36

Open mysterymagination opened 2 years ago

mysterymagination commented 2 years ago

Hard to say exactly what the problem is, but I have trouble picking up the BP_FireSphere even if it's out in the open. Under the stairs I can almost never get it. I thought at first the stairs were just getting in the way of the ray, which may be part of the problem, but the bigger problem seems to be that the ray does not fire through the reticle as I assumed it would.

Since (I assume) the viewport is basically the far plane of the frustum (or the base of the trapezoidal prism formed by the camera frustum if you prefer), the reticle is centered in the viewport, and the origin of our camera mesh is forward on X to and at the center of the YZ plane that makes up the camera 'lens' (same aforementioned far plane), it follows that the center of the viewport where the reticle is rendered should also be the origin point of our ray. However, this seems to not be the case.

TODO: debug draw the ray cast to confirm if our ray is not going through the reticle.

mysterymagination commented 2 years ago

Used both DrawDebugLine() and World::DebugDrawTraceTag from https://forums.unrealengine.com/t/draw-debug-lines-for-line-tracing/280307 and confirmed that the ray is slightly up and to left of the reticle for some reason. The good news is this seems constant so it isn't some crazed projection thing I need to account for but rather a static offset somewhere in the pipeline.

mysterymagination commented 2 years ago

I think I fixed this when I went into the FireInteractRay() code so we could have Maya look at herself; need to recheck