Just like applytapforbehaviors(), with onNotification, do I need to explicitly call something like playAnimation/applyNotificationForBehaviors? Maybe?
Post
Replies
Boosts
Views
Activity
Thanks for the reply and I believe my timeline is triggered by this notification. Because I append a notification action in this timeline and in my code I can receive the message from that action.
However, the TransformTo and Hide actions in the same timeline doesn't seem to be triggered. I have played that timeline in RCP, it went well. Note that TransformTo and Notification actions are targeted to the same Entity in the scene. And my Hide action targeting to a child entity of it. Any idea why this may happen? Thanks.
(I also tried using applyTapForBehaviors on the entity, but it;s still not working
Btw, I have converted all my stereo audios to mono audios for SpatialAudio. But it can still not be found.
Apparently this is only because I am running this in debug mode. With released build, the latency doesn't exist anymore.
Turns out most of the issues could be solved by UPGRADING to the LATEST version of ANYTHING
@Vision Pro Engineer Thanks for your reply and your help! I just copy and paste all of the parameters in your code snippet. But this still not works. I didn't paste the code because most of the component's parameters are set in Reality Composer Pro. You can see that in my attachments.
I am thinking it's about ModelEntity. In my case, "Qiu" is a ball with sphere collision box, but I checked that in my code, Qiu cannot be cast into a ModelEntity. I am thinking probably the Entity itself doesn't have a mesh attached to it, because Qiu is imported from a DCC, it has a child Entity containing a meshResource (but no collision sphere attached to this Entity).
But as the document said, as long as an Entity has PhysicsBodyComponent and a CollisionComponent, it should have the ability to participate physics simulation. Or there must be some misalignment between RealityComposerPro and RealityKit
Solved by my own. It turns out one .usda scene has a custom component which causes failing to deserialize the whole scene. I have implemented Codable and Component protocol but forget to implement Decodable I guess.
Turns out it's the matter of 3D model (or at least replacing with new 3D model can fix it). The original model contains a scope type (I don't know what does it mean in Reality Compose Pro). I use this model as .usdz and drag and drop to my scene. But it seems like this "scope" hierarchy has blocked the model to use its parent's anchor. Which I think with literal understanding, "scope" means it is not "controlled" by its parent?
fruitPrefab.usda -> "fruitPrefab.usda" sorry about this typo