DeltaYaw()

Blitz3D Forums/Blitz3D Programming/DeltaYaw()

Jerome Squalor(Posted 2007) [#1]
i have just started using the DeltaYaw and DeltaPitch functions and i encountered a problem.

I have a cube and i have a sphere

the cube is rotated at a yaw value of DelteYaw(ball,cube) so that it will point at the sphere

this all works fine until i rotate the ball

if i turn the sphere the cube turns with it.

is this supposed to happen, is there someway to make it stop?


Terry B.(Posted 2008) [#2]
Some code?


Stevie G(Posted 2008) [#3]
Maybe the cube should be rotated to deltayaw( cube, ball ) , rather than ( ball, cube ) so that the ball rotation has no effect on the cube.


Dreamora(Posted 2008) [#4]
DeltaYaw does not make the cube point at the sphere.
It will make the cube look at the difference of their two angles, which unless the sphere never was rotated will not be the sphere!

use pointEntity if you want to rotate it towars the sphere, or the atan2 and the difference in positions.