Download

Click and drag actor, position unstable when moving too fast

I’ve implemented a click and drag for actors where I can click on an actor and drag them around, however randomly it will snap to the edge of the screen if I move the mouse too fast.

Any ideas?

bump … help would be much appreciated

bump … help would be much appreciated

Is it possible that the cursor ends up outside of the viewport when you drag the object around?

I dont think so. I can drag the actor slowly across the screen with no problems. But, if i drag the actor quickly across the same path, it will snap to the edge of the screen and stay there until I hover over it, or any duplicate actors (i have many of them on the screen), at which point it will follow my mouse location again

Perhaps something is messing up with the visibility channel (maybe even the very object you are dragging); is this an empty scene or a densely populated one (apart from the objects in question)? Here’s my stab in the dark - consider setting up an object channel rather than using visibility for tracing:

Projects Settings > Engine > Collision > NewObject Channel > Block (default response)

In the object you are tracing against (floor?), set the collision to Custom and block only the channel you set up (it should be on the list now), then get hit like this:

b1333dee66c33b31a451c9700400608589231dfd.png

This will at least ensure you are tracing only against the objects you want, rather than everything that is visible in the scene. See if this irons out the kinks.