I have an elevator on the second floor that I’m trying to move down to the first floor.
I get the target world location (where I want it to move to), store it in a variable and use the move to component on the elevator to send it on it’s way. It works fine, but I just want it to move along the z axis only (up and down like an elevator). Right now it’s moving on all 3 axis’. and is going through walls and all that etc.
Yeah I’m aware of the lift tutorial but it uses matinee and that’s not an option for this particular elevator.
Also, on a side note is there a way to change how UE4 handles what direction is up? Up and down assigned to the z axis just looks silly to me. I’ve always been accustomed to Y being up and down.
I don’t think there is a way to change the axis of up and down.
As far as I’m aware gravity is hardcoded to Z right now which makes this rather difficult…
Anyway to solve your problem. I’m not entirely sure how exactly you setup your Blueprint but when you save the destination variable you could just get your X and Y from the current actor location and only get the Z axis from your destination location.
You can easily do that by “Break Vector” and “Make Vector” which will break your vector into Floats.
If you’re using Version 4.4 you could also lock your lift Blueprint to one axis inside of the Physics settings in the defaults.