I’ve Been trying to recreate this pick up System from Parcel Simulator However can’t figure it out. I’ve been using unreal engine physics handles for the handling of the pick up but can’t figure out how to have the object rotate its closes side towards the player and follow the players rotation when they move with the object without the object tilting towards the player when lifted.
I’ve done exactly what you’re trying to do right now, can you show me your pickup code? I can probably help you figure it out with adding just a few nodes!
Okay, yeah you’re at exactly the point I stopped because I didn’t need that functionality.
So what I would do is lots of simple maths condensed into (Pure) functions, using DOT product.
Get Actor Forward (Or some way of getting a vector you want to use)
Normalize them
Plug them into Dot Product node
1.0 is straight forward, 0 is left or right, -1.0 is perfectly opposite (facings)
That being said the left or right options… aren’t coming to me right now. But more or less you could use a selector with ranges (like between .5 and 1 means straight ahead) and only have it snap to 4 cardinal directions.
Currently I have work out a way to find out where the player is relative to the object by using the method you said however when I set the world rotation of the object before grabbing it. It seems to be just adding the rotation rather than just setting it. Do you know anything about this ?
Is there a reason you’re setting the world rotation for just the mesh instead of the entire actor?
It could have something to do with the Actor vs component rotation. Also what’s this “Hold” function looping here? Kind of strange to have something like this need to run 100 times a second.
Ohhhhh okay I think I understand what’s going on. It’s going to have to do with your hierarchy. Is your physics handle a parent of your mesh or vice versa? Because if you spin the parent then spin the child… You pick up what I’m putting down?