How to control repeatedly Rolling & Pitch a cube?

I want to have the user the ability to roll & Pitch a cube at 90-degree increments, no matter which way the cube is angled.

If the user:
Presses R the cube rolls (think of looking at a clock, the hands moving around it).
Presses F the cube Pitches/Flips (think of rolling a ball forward and backward to you).

I’ve tried doing this simply by controlling the X/Y/Z of the object in relative & world, but as soon as you Flip(X) and Roll(Y) once each at 90-degrees, the (X) now controls the Yaw.

I’ve tried putting Parents and Childs that each only control X, Y or Z and based on which walls I’m turning control one of those, but same issue.

I’m out of ideas, I need the X & Y to hold it’s direction (forward/back) (left/right) and rotate around those axis.

Thanks for any assistance or ideas!

1 Like

Do it with ‘add relative rotation’, rather than trying to use fixed amounts.

Do you want it to move instantly, or with a timeline?

@ClockworkOcean thanks for the reply, trying that, still seem to have the same issue, maybe my blueprint is wrong?

demo: Imgur: The magic of the Internet

Like this

cube

2 Likes

@ClockworkOcean
that worked amazingly! i’m trying to figure out what you did differently, does the ‘combine’ work differently then me just ‘adding’ 90?

you set your current state at the beginning and mine was the end, so not sure if that made a difference.

is there a simple way to not allow a second press till the rotation is over?

1 Like

Yes, that’s what I was trying to say :smiley:

If you stick to doing it with rotator nodes, their internals deal with ‘gimbal lock’, which is the problem you were having…

Check out DoOnce.

Thank again, this is what I finalized with.

Yes! :smiley:

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.