Skip to main content
9 events
when toggle format what by license comment
Nov 29, 2018 at 17:31 vote accept Daniel Lip
Oct 23, 2018 at 14:37 comment added Daniel Lip I tried it few times now moved the player fast through the door and it's working. I can't think of other way to test it then just trying it over and over again. But for now it seems to be working :)
Oct 23, 2018 at 14:35 comment added kolenda This should work but it's hard to tell just by the description :). I'm not sure if Unity does sweep tests, if so then it should fix your problem completely.
Oct 23, 2018 at 14:26 comment added Daniel Lip It seems to be working good. Do you think there should be any problems ?
Oct 23, 2018 at 14:26 comment added Daniel Lip And then make the code that was in the OnTriggerExit before then set one of the flags to false so it will make the cutscene once. Now I can destroy the cube after finishing the cutscene since the area and places behind the door will be playable area later.
Oct 23, 2018 at 14:25 comment added Daniel Lip What I did in the end is added a new Cube on the side of the door I want to be the exit trigger. Changed the cube scale to be the size of the door trigger on the X and the cube is a bit inside the door trigger area so there is not space between them. Added a new script to the cube with a OnTriggerEnter and a flag set to true when entering. In the first script the door script on the OnTriggerExit I check for the tag and also set another flag to true. Then in the Update I'm checking if both exit here and enter there are true.
Oct 23, 2018 at 13:05 comment added kolenda It is some workaround but keep in mind that if you leave a small hole between triggers then your object may move to this hole one frame and then pass the second trigger another frame :) so this may still break. If you don't have playable area behind the doors then just create some big trigger, like 100m and you're done.
Oct 23, 2018 at 12:50 comment added Daniel Lip Now that I'm thinking about it I could add after the door the side I want to trigger another empty GameObject with a trigger let's say about 2.5f distance from the door trigger. And that empty GameObject with the trigger will start the cutscene. Then I can destroy the empty GameObject. Is that logic good idea ?
Oct 23, 2018 at 9:57 history answered kolenda CC BY-SA 4.0