Whenever I have a fast animation with line trace the line trace tends to spread a lot more. However if I have a slower animation the line trace doesn’t spread as much.
How can I fix the spread with line tracing so it can sync with my fast animation?
Okay, can you expose the FPS of your project and upload a new video? I’m unsure as to what the binding draw call is for your stylus. I imagine that if the markings are FPS-bound, that could explain why you’re getting the spread. (Kind of like how the shutter speed of a camera determines how smooth a video will be.)
Yeah, I don’t have any fps drops.
I did some research and I found the problem is tied to the framerate. The mouse refresh rate is higher than the tick so the mouse jumps to a point instead of drawing/tracing the whole line.
The only way I can think is to have some kind of checking at every tick, to trace the currentpoint-lastpoint…
Doing this with a line trace is nonsensical. Period.
The time between the trace start and any Hit Response varies based on the distance the ray has to travel.
Sure, we are talking microseconds - but what you are seeing now is only amplified at lower frame rates - which is all this engine provides.
Further, its just not how it is done in any way shape or form for anything really.
If you want to draw something, you use the mouse coordinates to do so - no traces involved.
You can potentially run the first trace, place the object you want to build or draw in the first hit position you get, build up the object from there by only using the mouse position until the button is unclicked.
Another, perhaps better but still intensive compared to reading mouse positions only approach could be to use the initial Down event to spawn a sphere, and then to move (sweep) the sphere by assigning it the correct value offset read off the mouse movement.
With the sphere being set to collide with the environment you could achieve similar effects to what you have, where the drawing wraps around objects.
Either way, not line trace related in the sense that a line trace shouldnt be in use for this at all, definitely an FPS issue, and on top of that its likely got to involve the polling rate that unreal can interpret via input on a mouse.
Unless you crack open a c++ library that exposes custom raw input for you, you will always be at the mercy of what unreal can handle as far as input speeds go - which isn’t all bad btw, but still way less than the real mouse raw input would be for any decent mouse.
Even with c++ because unreal essentially sucks, you are stuck with reading the mouse values at specific points / be it tick intervals or once each frame.
Since with a good mouse the pointer can move across 3 4k screens in about a frame (.12ms) you will always have the issue using anything resembeling the current setup…
Okay, can you expose the FPS of your project and upload a new video? I’m unsure as to what the binding draw call is for your stylus. I imagine that if the markings are FPS-bound, that could explain why you’re getting the spread. (Kind of like how the shutter speed of a camera determines how smooth a video will be.)