# How can i get a special point's color from coordinate system(xyz) by define a point

## Recommended Posts

I'm preliminary study on Babylon,and there's a question:

suppose that there is a color cube in the coordinate system,i wanna define a point object,this point can be set (x,y,z) and Corresponds to a point on the cube.and i can obtain the cube's color by this point.....

so ...is there any method that can make it?

##### Share on other sites

Hello,

you can create a ray from this point and do a scene.pickWithRay. This will return a pickInfo. If the box is hit, you can then use something similar to that:

##### Share on other sites

ah,Thank u Deltakosh,i've tried that,seem that i can't get the inside vertex's attr.or maybe i didn't know how to use Ray correctly.but I'm working on it ~!!Thx

##### Share on other sites

As usual I am not very good at working out what people actually want to do, though others seem to pick up on these things.

Do you mean some thing like where the (x, y, z) just tells you which cube and you want to find the color of the cube

or

something like where the (x, y, z) is a particular point on the cube and you want to know the exact color at (x, y, z)

or something else. Diagrams are worth lots of words.

##### Share on other sites

20 minutes ago, JohnK said:

As usual I am not very good at working out what people actually want to do, though others seem to pick up on these things.

Do you mean some thing like where the (x, y, z) just tells you which cube and you want to find the color of the cube

or

something like where the (x, y, z) is a particular point on the cube and you want to know the exact color at (x, y, z)

or something else. Diagrams are worth lots of words.

yes,,thank u JohnK,and it's like the second picture,but that point isn't on the cube,

Diagram did help more!?

## Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

×   Pasted as rich text.   Paste as plain text instead

Only 75 emoji are allowed.