Hello everyone,
I’m working on this problem now for days and since I am completely new to Unreal and Blueprints, I have no idea how to solve it. I want to open a sliding door with a HTC Vive Motion Controller by grabbing the knob of the door (StaticMeshComponent (Inherited)) and make it follow the Motion Controller. This already works with the Blueprint I posted below.
My Problem is, when I use this Blueprint class inside the Level and change the orientation of the door there (for example by 90°), the movement isn’t working as it should, because the world axis and the local axis of the sliding movement are different. How can I adjust both axes so the doors sliding axis is every time the same no matter what orientation in the world the door has. I could change the location nodes inside the blueprint. but I want this to be done automatically. Is this even possible?
Hey there, ideally you want to move the doors in relative space instead of world space, that way it will work in any orientation. If your door is not the root component you can use the Set Relative Location node.
Thanks, that worked. But now I have another problem.
The Door knob is not following the Motion Controllers Movement as it should. On the one hand I got an inversed movement (moving controller to the right, door moving to the left), on the other hand it’s not following in the right velocity and distance, the door is really slow and not following the same distances I make with the controller. I hope you understand what I’m trying to say.
Hey, thanks for the fast answer. I’m not really sure I am understanding what you’re asking for but I’ll try to answer.
First i’m moving the motion Controller inside the Box to enable the Input. Afterwards I pull the trigger to Move the Door. Still pulled I’m moving my hand with the controller and the door is moving in the opposite direction very slowly (as seen in the video). The door is fixed in the x and z-axis simulating the sliding, the y-axis is given by the movement of the controller. Is that what you meant?
The goal i want to achieve is to move the door with the same speed and velocity as the motion controller. The door should follow my hand movement one-to-one.
If the motion controller is the root component then that relative transform will be the same as the world transform. I would say you need to track the delta location of the motion controller but from the camera’s relative transform or something like that.