Skip to content

Conversation

BastiaanOlij
Copy link
Contributor

This PR adds documentation for the spatial entities implementation being added here: godotengine/godot#107391

@BastiaanOlij BastiaanOlij added this to the 4.x milestone Jun 11, 2025
@BastiaanOlij BastiaanOlij self-assigned this Jun 11, 2025
@BastiaanOlij BastiaanOlij added enhancement topic:xr Related to XR documentation labels Jun 11, 2025
@AThousandShips AThousandShips added the waiting on pr merge PRs that can't be merged until an engine PR is merged first label Jun 11, 2025
Copy link

@JD-The-65th JD-The-65th left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I noticed a few grammatical issues and typos so I wanted to make a review addressing some of them. I saw that it was also a commonality in this PR to omit commas after dependent clauses, so I left in 2 cases where I noticed it occurred, but I can go back and mark more where I noticed them.

@AThousandShips AThousandShips removed this from the 4.x milestone Jun 12, 2025
Copy link
Member

@AThousandShips AThousandShips left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Will do a pass to improve sentence structure as well later

@BastiaanOlij
Copy link
Contributor Author

Thanks for the feedback everyone, just to let you all know, I'm planning on updating this PR after we're certain about the API on the implementation PR just to minimize having to go back and forth on those changes. Will be updating this PR soonish

@BastiaanOlij BastiaanOlij force-pushed the openxr_spatial_entities_docs branch 7 times, most recently from a5b0b4a to 4edb00e Compare August 6, 2025 05:56


**
Q : Should we be doing update queries here to get position changes for markers??
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Mostly a reminder to myself, I need to add this in. We now do this in the built-in logic as well.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this still something you plan to add? Or, should this be removed at this point?

@BastiaanOlij
Copy link
Contributor Author

I think I covered all the comments, only some outstanding stuff around parameter naming which remains a problem.

Also need to find some time to add update queries to the marker example.

Copy link
Member

@AThousandShips AThousandShips left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some suggestions for breaking up the sentences, can look at more cases later

@BastiaanOlij BastiaanOlij force-pushed the openxr_spatial_entities_docs branch 2 times, most recently from e0bca81 to 73c533b Compare August 29, 2025 02:58
@BastiaanOlij BastiaanOlij force-pushed the openxr_spatial_entities_docs branch from 73c533b to b04e6b1 Compare September 29, 2025 09:25
@Repiteo Repiteo removed the waiting on pr merge PRs that can't be merged until an engine PR is merged first label Sep 29, 2025
@Repiteo
Copy link
Contributor

Repiteo commented Sep 29, 2025

The source PR has since been merged, so this should be prioritized once the style changes are accounted for

Copy link
Member

@AThousandShips AThousandShips left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I believe it looks good now

@BastiaanOlij BastiaanOlij force-pushed the openxr_spatial_entities_docs branch 3 times, most recently from 3f59079 to dcbf8f6 Compare October 1, 2025 10:53
@BastiaanOlij
Copy link
Contributor Author

Not entirely sure why its not finding some things in the class definitions because those classes should be registered. Unless I'm overlooking a typo or mistake in the references?

@skyace65 skyace65 added this to the 4.6 milestone Oct 11, 2025
@BastiaanOlij BastiaanOlij force-pushed the openxr_spatial_entities_docs branch from dcbf8f6 to c2523fc Compare October 13, 2025 00:17
@BastiaanOlij BastiaanOlij force-pushed the openxr_spatial_entities_docs branch from c2523fc to 71ba12c Compare October 13, 2025 00:37
Copy link
Contributor

@dsnopek dsnopek left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, this looks great!

Only have a bunch of minor notes about type-o's, making some bits a little clearer, and what-not

It has a very modular design. The core of the API defines how real world entities are structured,
how they are found, and how information about them is stored and accessed.

Various extensions are added on top that implement specific systems such as marker tracking,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
Various extensions are added on top that implement specific systems such as marker tracking,
Various extensions are added on top that to implement specific systems such as marker tracking,

* - Enable persistent anchors
- Enables the ability to make spatial anchors persistent. This means that their location is stored
and can be retrieved in subsequent sessions.
* - Enabled built-in anchor detection
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
* - Enabled built-in anchor detection
* - Enable built-in anchor detection


# See if this tracker should be managed by us and add it.
func _add_tracker(tracker: OpenXRSpatialEntityTracker):
var new_node : XRAnchor3D
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we use the style without a space before the colon in the docs (but I'm not 100% sure about that):

Suggested change
var new_node : XRAnchor3D
var new_node: XRAnchor3D

# A new tracker was added to our XRServer.
func _on_tracker_added(tracker_name: StringName, type: int):
if type == XRServer.TRACKER_ANCHOR:
var tracker : XRTracker = XRServer.get_tracker(tracker_name)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
var tracker : XRTracker = XRServer.get_tracker(tracker_name)
var tracker: XRTracker = XRServer.get_tracker(tracker_name)

# A tracker was removed from our XRServer.
func _on_tracker_removed(tracker_name: StringName, type: int):
if type == XRServer.TRACKER_ANCHOR:
var tracker : XRTracker = XRServer.get_tracker(tracker_name)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
var tracker : XRTracker = XRServer.get_tracker(tracker_name)
var tracker: XRTracker = XRServer.get_tracker(tracker_name)

It's up to your use case how best to link the marker data to the scene that needs to be loaded.
An example would be to encode the name of the asset you wish to display in a QR code.

**Maybe see if we can work out at least one example here, need access to hardware that supports this, should have that soon**
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks like a TODO: are you still planning to add something here? Or, should this note just be removed?

For most purposes the core system, along with any vendor extensions, should be what most
users would use as provided.

For those who are implementing vendor extensions, or those for who the built-in logic doesn't
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
For those who are implementing vendor extensions, or those for who the built-in logic doesn't
For those who are implementing vendor extensions, or those for whom the built-in logic doesn't


extends Node

var spatial_context : RID
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think I'm going to stop pointing these out. They can all be grep'd for and there's also the possibility that the docs style doesn't mandate this anyway :-)

Suggested change
var spatial_context : RID
var spatial_context: RID

Comment on lines +810 to +811
are different between your discovery snapshot and your update snapshot, you have to take that you query
different components into account.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think some words got jumbled in this text: "you have to take that you query different components into account"



**
Q : Should we be doing update queries here to get position changes for markers??
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this still something you plan to add? Or, should this be removed at this point?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement topic:xr Related to XR documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants