Jump to content

Difference between setDirection an setViewDirection


photo

Recommended Posts

		mpPlayerSpectator->setDirection(direction, Unigine::Math::vec3::UP);
		mpPlayerSpectator->setViewDirection(direction);

I'm having some difficulties understanding the differences between the two functions above.

For the first one, is for all nodes. here is the definition you're giving :

Quote

void setDirection ( )

Updates the direction vector of the node and reorients this node: the specified axis of the node becomes oriented along the specified vector in local coordinates. For example, after running the code below, you will get the X axis of the node pointed along the Y axis in local coordinates.

The second one, is only for a playerSpectator:

 

Quote

 

void setViewDirection ( vec3 direction )

Sets a new Player's view direction vector.

 

 

Can the viewDirection be different from the direction ? And if yes what are those differences ?

 

Link to comment
×
×
  • Create New...