Est-ce qu’une API de raycast est prévue dans Verse prochainement ?
Actuellement, il semble impossible de tester la visibilité entre deux agents ou de détecter s’il y a un obstacle (comme une structure construite en partie).
Autre question : est-ce qu’un accès aux constructions dynamiques (builds joueurs) est envisagé pour Verse dans le futur ?
Il est possible de le faire via Scenegraph, entre entity. Reste à prendre en main SG pour comprendre tout ça, et techniquement oui
available {MinUploadedAtFNVersion := 2930}
# Find all objects in the scene that currently overlap this entity.
(Entity:entity).FindOverlapHits<public>()<transacts>:generator(overlap_hit) = external {}
@available {MinUploadedAtFNVersion := 2930}
# Find all objects in the scene that would overlap this entity if it were placed at GlobalTransform.
(Entity:entity).FindOverlapHits<public>(GlobalTransform:(/Verse.org/SpatialMath:)transform)<transacts>:generator(overlap_hit) = external {}
@available {MinUploadedAtFNVersion := 2930}
# Find all objects in the scene that would overlap Volume if they were placed at GlobalTransform. NOTE: This entity defines the context(scene) for the query but does not otherwise take part in the sweep.
(Entity:entity).FindOverlapHits<public>(GlobalTransform:(/Verse.org/SpatialMath:)transform, Volume:collision_volume)<transacts>:generator(overlap_hit) = external {}
@available {MinUploadedAtFNVersion := 2930}
# Find all objects in the scene that would intersect this entity if it were swept from its location along the Displacement vector.
(Entity:entity).FindSweepHits<public>(Displacement:(/Verse.org/SpatialMath:)vector3)<transacts>:generator(sweep_hit) = external {}
@available {MinUploadedAtFNVersion := 2930}
# Find all objects in the scene that would intersect this entity if it were swept from GlobalTransform along the Displacement vector.
(Entity:entity).FindSweepHits<public>(Displacement:(/Verse.org/SpatialMath:)vector3, StartGlobalTransform:(/Verse.org/SpatialMath:)transform)<transacts>:generator(sweep_hit) = external {}
@available {MinUploadedAtFNVersion := 2930}
# Find all objects in the scene that would intersect Volume if they were swept from GlobalTransform along the Displacement vector NOTE: This entity defines the context(scene) for the query but does not otherwise take part in the sweep.
(Entity:entity).FindSweepHits<public>(Displacement:(/Verse.org/SpatialMath:)vector3, StartGlobalTransform:(/Verse.org/SpatialMath:)transform, Volume:collision_volume)<transacts>:generator(sweep_hit) = external {}
Le projet sample scene graph montre comment l’utiliser, si jamais.