Need Help with a Sphere Trace Issue

Need some help with an issue regarding a sphere trace I have in my project. I have logic that disables user looking input when the player sphere collider colides with the computer in the video. Once I snap the player camera to the computer on interact, the sphere trace should not be able to move. If I hold my LMB while moving my mouse, the sphere trace still rotates. Why is this and how would I go about fixing it? I started in the default first person project so all of the input actions and mappings are still default except for a custom one bound to ‘e’ for interactions.

I’m guessing your capsule and/or character movement component is still moving if you’ve only locked camera movement.

How would I go about locking just the character movement component? So far I’ve found that I can disable a mapping context, but the default mapping context has more than just the basic character movement attached. I’d rather not make many mapping contexts to switch on and off.

I also tried looking into locking the sphere trace itself, however I can’t find how I’m supposed to trace it. I’m trying to watch the forward vector and world location outputs but getting (0,0,0) for each every time a new sphere trace is drawn out. Know why that would be happening?

See the attached.

The highlighted code will disable all input, meaning you can’t manually reactivate movement via input. So, you’ll need to call the function to do so with a timer, anim notify, or something else autonomous.

I’m not too familiar with UE myself, so I don’t know about the trace bit. Perhaps, your logic is off and you’re simply getting the delta between them, which would be 0,0,0 if the trace is defined by the character/forward vector.

(post deleted by author)

So this solves the issue of movement, however my main issue is rotation after the camera snap. If I hold a mouse button and drag (even after disable movement is called), my character still rotates (and the sphere trace origin along with it).

This also solves my movement issue, but not the rotation issue (refer to my other reply)

The Disable Input node disables all input–mouse clicks, movement (yaw, pitch, roll), and keyboard keys. So, you may be transferring control, at some point, to your widget inputs, I guess…

Below, I have a rough stat menu, which freezes the world but allows for mouse movement and clicks for the application of skill points. The Disable Input node has no impact in this case because of the Set Input Mode Game and UI node.


This may be what you’re doing. If so; I don’t know if this is the best approach, but you could add a simple Boolean to tell the camera/character movement component/etc. when not to work.