Grab box problem

I am trying to make a system where I can grab a box with my mouse cursor. The box keeps snapping out of location from the cursor, and I can’t grab it with physics enabled. Please help!

1 Like

Please post script! It might be the case of tracing against the box while you’re already holding it, which would create a crazy feedback loop. It might be another 10 things, too. :person_shrugging:

This is my script for the box

1 Like

Have a look at this post, there are examples of moving an actor with the mouse using a specific axis:


The script you’re showing seems to suffer from the issue I mentioned originally, you keep tracing against the component you’re already holding so the position keeps shifting.

How do I get this node?

Right click any object reference variable to validate it. It does the same as the two nodes below.

Got it! Thanks!

And one more thing, what variable is the actor to move?

Actor, you can easily create variables of the appropriate type with right click promotion:

Fewer clicks = fewer chances for the carpal tunnel syndrome :innocent:

Thanks for the help. I just got it working, and wit’s working quite nicely. :slight_smile:

1 Like

After this, how do I get it so that the box can’t move through other static meshes in the world?

Enable Sweep on the Set Actor Location node.

Alrighty! Thanks a million!