Spatial-Coordinates

Hi,

I need the coordinates any Spatial consists of.

Is there a method to deal that?

You may have to elaborate.

1 Like

Thereâ€™s spatial.getLocalTranslation() and spatial.getWorldTranslation(), but as Paul mentions, youâ€™ll have to elaborate.

Read the quick help and the tutorials.

Mhhh, I dont need the location of a Spatial.

A Spatial consists of vertices which openGL renders.

I need those vertices, because I want to create a 2D-DebugView of my scene

and thats why I need all vertices/coordinates to draw the Spatials in 2D out of lines.

@androlo said:
Read the quick help and the tutorials.

OK then,

how can I convert a Spatial into a Mesh or an Array/ArrayList of Meshes?

Probably do the tutorials.

RTFMâ€¦ seriously

Please post a link to the right tutorial, because I cant find it.

Start with the first tutorial. Then do the second tutorialâ€¦ keep going until you get to the one about custom meshes. Donâ€™t skip ahead or you will be back with 10 other questions and weâ€™ll just point you back to the tutorials.

Well, I read those tutorials but couldnt find any solution for my problem. I only want to get all the vertices of a Spatial and I thought that converting it into Meshes is a beginning, because you can get the vertices of a Mesh. So here is my question once more:

How can I get all the vertices of a Spatial?

Ok, Iâ€™m already predicting the next questions, but here goes:

I donâ€™t get why you donâ€™t just take a orthogonal 2d render of the vertices for that debug view using a preView and a mesh material override? Anyway I still think your preconceptions are working more against you than you think and by â€śdoing the tutorialsâ€ť nobody here meant â€śsearching for an answer to your exact questionâ€ť, you have to actually do them, its between the lines so to speak

You canâ€™t spatials donâ€™t have vertices.

Geometries on the other hand, they contain meshesâ€¦and meshes contain vertices.

In fairness thatâ€™s only 95% in the tutorials. The other 5% is in the javadocâ€¦