Hello Unreal experts,
I’m working in VR trying to make a player pawn that can pick up world items and use/investigate them using the Vive motion controllers. I’m extremely new at this and while I’ve had plenty of success so far, I’ve sort of hit a wall.
I’m looking for a way to maintain the “way” an item is picked up. I can pick up an object at any part, e.g. bottom, at the hilt, etc, but the rotation of the object settles on it’s default value when it’s picked up.
I want the way something is picked up to persist. I have a link of a video showing my problem here
Also, here is my blueprint here
Any help you could provide would be muchly appreciated. If I find an answer to this problem I’ll post it here.
I believe I ran into this when spawning building blocks to layout in game, I wanted them to maintain the rotation I spawned them at. You will want to “break” your world rotator into x,y, and z. You will then “make” the rotator and plug it into where your world rotation plugs into. You can then choose which values you want to transfer. If you connect the x’s and the z’s then your y (Pitch) will not change. Whichever value you do not connect up will be the values that remain constant. Hope this helps.
Thanks for your answer. It’s good information that I’m sure will come in handy when I’m making things like doors and drawers.
For regular objects though, I’m not looking to constrain an axis relative to the world, but constrain every axis relative to the motion controller. My blueprint already does this, but it “resets” the orientation to something other than how I picked up the object. When I pick up the object, I want the initial constrain to be set by how that object is set in the world, e.g. I could pick up sword by the blade and hold it horizontally (because I picked it up that way) or I could hold it by the hilt properly if I pick it up properly.
Maybe doing a cast to the actor to retrieve the transform information from it and then send it back as it is picked up? Just a thought…