# How can I get the direction for a square box component?

How can I get the direction of the square box? Because I need to define a direction of the square box in my simulation. for example, assuming the box is moving and a little bit rotation, and I want to calculate the distance of moving in the direction (eg. vertical of a side of the box) in 5 seconds. So, how we know the vertical of a side of the box?

I know how to get the position when the box is moving. But I have no idea how to get the direction (eg. vertical of a square box) of a component.

maybe this is not very clear. please write comments if you have any questions.

Thanks a lot!

edit retag close merge delete

or, could I get the corner coordinate? If yes, I have idea for this problem

( 2017-11-13 11:30:13 -0500 )edit

( 2017-11-13 11:48:49 -0500 )edit

no, this does not answer my question. I used GetWorldPose() to get the position. But it is not enough to define a direction of a box. maybe one more coordinate of a point in the box or the line of an edge in the box is necessary to get a direction (orientation) of the box. Thanks a lot!

( 2017-11-13 15:57:12 -0500 )edit

do you know how to get the corner coordinate of a square box, or the line or point on the edge of the a square (not limited on my box)? Thanks a lot!

( 2017-11-13 16:10:51 -0500 )edit

very good! I will try and give you feedback later. I guess It should be working. Thanks a lot!

( 2017-11-14 03:13:07 -0500 )edit