How do you stop a rotateing actor with another actor?

Hello,

I would like to stop a actor upon colliding with another actor. for example, I have a toilet that uses raytrace, a timeline node, and a Set Actor Relative Rotation node, the Lid opens. Seat is set up similar to the lid on a separate blueprint. The problem is that if you open both the lid and the seat you can close the lid and it will clip through the seat looking rather strange.

My question is how can I make the the lid never collide with the seat. if the seat is open, you must close it before the lid can be closed.

I hope this makes sense to someone who can help me.

Thanks,

You can keep track of what is opened / closed with boolean values, one variable for each element. And prevent interaction after checking those states.

When interacting with the seat, check if the lid is opened / closed. And the other way round. Once the timeline has finished you can set those states for each element.

If an illogical state is detected, you do not run the timeline.


if you open both the lid and the seat
you can close the lid

But! As an avid and fairly experienced toilet user, wouldn’t it make more sense to open / close both at the same time? The seat can also open the lid & the lid can easily close the seat. Worked pretty well last time I tested it.

Or is it the game mechanics that requires this specific, limited interaction (which is easier to set up)?

Thank you for the feedback,

I am unsure of how exactly to do what you had mentioned but I greatly appreciate the starting point. I may have to alter the project like you had mentioned to open/close both at the same time, if all else fails.

I have this problem with a few various objects. So I would like to find the actual solution.

Here you go:

Image from Gyazo

To simplify it, it was done inside 1 object:

I may have to alter the project like
you had mentioned to open/close both
at the same time, if all else fails.

This would be a tad more involved, actually. Stick with one at a time as above. You can always add additional logic later, once you get it running.