I am using absoluteposition.
it was something like this:
Code: Select all
z=node.getpostion(core_vector3df(.x .y .z))
Could post the correct code .
Thank You!
Code: Select all
z=node.getpostion(core_vector3df(.x .y .z))
it RETURNS a vector3df, it does not modify variables that you pass in.speedy15453 wrote:I just can't find the code to get the values for x,y,z .
I understand it is core_vector3df. I need to check the values to find out where the node is in world positions after I make rotations to the node.
Code: Select all
if (node)
{
// get the position of the node and store the values in the variable named pos
vector3df pos = node.getPosition();
// print out the values of the variable named pos
printf("Node is at position (%f %f %f)\n",pos.X,pos.Y,pos.Z));
}
else printf("Node is not valid\n");
Code: Select all
node1.updateAbsolutePosition ' works
pos2 = node1.getAbsolutePosition() 'works
printf("Node is at position (%f %f %f)\n",pos2.X,pos2.Y,pos2.Z)) '"this method or property does not exist"
' I tried different variations and nothing.
the printf function isnt required for what you want to do, it was just an example for you to understand how the vector3df works. just use the values hwoever you need.speedy15453 wrote:I can't get it to work using my IDE (realbasic with Irrlicht plugin "franklin3d")
anyother sugestions?Code: Select all
node1.updateAbsolutePosition ' works pos2 = node1.getAbsolutePosition() 'works printf("Node is at position (%f %f %f)\n",pos2.X,pos2.Y,pos2.Z)) '"this method or property does not exist" ' I tried different variations and nothing.
Code: Select all
pos.x_
pos.y_
pos.z_