Hello guys. Is there a way to trigger an animation with the target tracker and keep the scene going even if camera is not targeting anymore?
Thank you
Hi,
You could in theory do this by taking the stuff you’d normally put in the target tracker outside of the base hierarchy (outside of the Device).
You’ll then have to manually re-create the position/rotation/scale binding, aka make your null group take the position etc of the Target Tracker (this involves going from one coordinate system to the other, as the target tracker and outside Device don’t share one, which means simply making them equal will lead to weeeeird positioning for the null object. I’m not sure how to do this, but googling it should bring answers )
Once you have it positioned properly and outside the target tracker, you can create your own logic for when it appears/disappears. You’ll likely also have to create a system to freeze the position/rotation/scale values of the target tracker should it stop being tracked.
That is what I thought and I’ve tried this solution (beside the positioning), but it doesn’t work.
As soon as I leave the tracker the assets desappear. I believe is something in script but I can’t read it
In the pic “scene” is the null with my scene
Mmmh, you’d have to add the logic that freezes the transform values when the tracker isn’t found. As soon as you move away from the tracker it likely puts all transform values to 0,0,0, hence your scene disappearing. I’m not too sure how to save values in patches though there is a way. Might have to go the code route
Try adding a “Delay” Patch to see if that allows you to keep the scene visible for the delay duration. If it does then it is indeed a position value issue, so figuring out a way to create and If/Then/Else where the position values are freezed IF target tracket not found anymore and until is is found again.
Here’s what happen, the scene has an animation that is triggered by the target tracker, as long as I frame the tracker I can see the scene, if I move then the scene disappear and when I come back the scene is there with its animation completed. So I believe it’s the script that reads the entire list of object in the device and shows them only if the tracker is framed.
I’ve tried the delay and a if patch that listen the pulse value and set visibility of the scene to true either if it’s true or false.
mmh, I still think it’s mostly an issue tied to the positioning, not the visibility toggle. I could be wrong of course, would need to see the actual file to determine for sure. Worst case I’ll try rebuilding something similar tomorrow and see if I succeed
You can use a delay value patch to freeze the transforms, similar to how you would create a texture snapshot with render passes. Here’s some pseudocode that you can translate into patches:
if(trackerIsVisible) { useLivePosition }
else { useDelayValuePosition }
I’m not sure if it will work, but it’s worth a shot.
Here’s a more thorough explanation of delay value: