Hi everyone, i'm trying to open and close doors using translate -> rotate by on a non static movable object, to do this i want to switch between 2 use interactions present in a same hotspot, open door interaction is enable by default while close door interaction will be activated after open door interaction is used. It looks enough logic to me, but i don't know why, open interaction works as expected opening door, disabling open interaction and enabling close interaction(at least i see bools changing) but when i try to close door clicking on hotspot the door keeps rotating by 10 or less, looks like it continue the open interaction. As an alternative way i did one more try using "check interaction enabled" getting same results. Many thanks
It looks like you're new here. If you want to get involved, click one of these buttons!
Comments
Is the correct Interaction ActionList running at the right time? Try running them manually via their Inspectors - if things still go wrong, it's likely an issue with the Actions themselves.
I don't know what you mean by "10 or less" - as this is a visual problem, let's see screens of the Actions and the effect they have on the door itself. Though this method should be viable, do know that another way to do this kind of thing is to rely on animation - where you create your "Open" and "Close" animations on the door's Animator, and then control their playback instead with an Object: Animate Action.
Oh well, the doors actually rotate on Z axis, i've just wrote bad.
those are my actions:
Open door action:
https://ibb.co/wM5BtS1
Close door action:
https://ibb.co/7QK2QXP
I've started the idea using animator, but due to too much animations i have to create i've decided to stay just with movable one.
Edit
Tried to run action list and the problem still remains on "close door interaction", set up as image above. While door closed and trying to run "close interaction" it opens the door by something like 10 degrees (instead of go to opposite direction).![:) :)](https://adventurecreator.org/forum/resources/emoji/smile.png)
Hope i was clear enough
Try checking Do euler rotation?. If that doesn't work, might be best to go with a Marker approach.
Place down two Markers (OpenMarker and CloseMarker) that have the Transform values you want the door to have when opened and closed. These'll need to be at the same position as the door.
Then change the Action's Rotate popup to Copy Marker, and assign the Markers for each. The door can then be made to adopt those Marker transform values.
Did "Do euler rotation?" improve things?
No it doesn't work even with euler rotation checked.![:( :(](https://adventurecreator.org/forum/resources/emoji/frowning.png)
Best to stick with Markers, then, or my own preference - animation.
Back on it! I've found a solution, which is not so much understandable by me but at least it works. Had to make a calculation doing it:
In case of "Open" interaction i've used transform -> rotate By -> 30
In case of "Close" interaction i've used transform -> rotate By -> -210, that means 180 + 30 used by "Open".
Both with euler rotation unchecked.
I don't know why it works like this but its perfect.![:) :)](https://adventurecreator.org/forum/resources/emoji/smile.png)
Just a small note:
I did this on a kitchen furniture door, instead in house doors i had to do "Open" -180 and "Close" 360. Probably theres something strange but at least using "Run Now" it became more easy to manage it.