Here is how it works:
A trigger moves into a rigidbody and gets deactivated on the “triggerenter” event.
Another entity resets the trigger’s position, when the player presses Space, and then activates it.
The trigger checks for collision right where it got deactivated, so it just gets deactivated again.
This only happens if I reset the trigger on an “update” function. It will work as intended if I activate it on an event or inside a “SetTimeOut”, even if the delay is 0.
I hope you can understand me, my english is not perfect.
Thank you for example, that helped a lot to replicate and fix issue.
So looking in engine sources we do syncEntityToBody, which brings trigger body to entity position (not sure why it is called vice-versa). That method is called before script update loop if entity and trigger is enabled. Means that trigger wont be synced till next update tick of components updates, which happens after physics simulation. So for one tick you will have trigger in old location.
I’ve added extra sync to enable method on trigger, to make sure that it synced after being enabled during script update.
That resolves the problem.
We will deploy the engine shortly.
By now you can add this line to your code that resolves the issue:
We should be deploying engine today or early next week. We usually deploy it very often