Stride Sphere Model and its Bounding Sphere


a Sphere [Stride.Models] does have a Bounding Sphere, which could be meaningful for checking spatial reations. However, there seems to be a difference between the Model the Entity is created with and the ModelComponent, which it also has. which one is relevant for the Sphere [Stride.Models] and what is actually the difference between them.

also, it seems that both of them are not initialized with the actual radius when the sphere is created (and manual initialization only works for the BoundingSphere [Model]. should this considered to be a bug (thinking that the BoundingSphere is a property that is part of the Model in any case).


Hey, the BoundingSphere is not in use in Stride, from what I can see in the code. Use BoundingBox instead…

The difference is that the ModelComponent one is updated by the component processor, you shouldn’t touch that one, it’s used for internal computations.

To get the runtime values, connect the sphere to a running scene graph, the values should get populated then.

thanks for trying to clarify but i think i still don’t get it. trying something similar to get the BoundingBox also results in a Box with no dimensions (i.e. not initialized). is it the right way trying to retrieve these things via Entity->GetComponent->Model[Modelcomponent]->BoundingBox[Model] ?


Also, I just had a look at PrimitiveProceduralModelBase.cs and
according to these lines both, a BoundingBox and a BoundingSphere should be initialized on creation of one of these models - right?

sorry, the stride docs are not very elaborate on how to use these properties…

Yes, they should both be set on the model… That’s very odd indeed. I’ll have a look.

congratulations. you found two bugs in one:

  • Strides mesh copy constructor was not copying the BoundingSphere, see
  • Our primitive entities modesl are constructed without a BoundingBox. In fact the MeshModel node they use internally is not considering BoundingBoxes. We’ll fix this on our end. Meanwhile what does work: Access the BoundingBox via the ModelComponent, not via the Model, like so:


Could it be that the BoundingSphere copy-constructor fix in Stride did it make not yet into the VVVV releases? At least on my end in 21.4.10 and 21.4.11-1055 the radius of the BoundingSphere is still always “0”.
I checked with my own build of Stride where the fix was applied and then everything works as expected (radius giving reasonably values).

Edit: Ah, just saw in the about section that Stride is still at version in latest VVVV releases. Any ETA when the update to a newer stride will be made?

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.