Homing missile

Blitz3D Forums/Blitz3D Programming/Homing missile

I think it's because your using the pivot's absolute rotation value to influence the turning of the missile. What you need to do is work out the difference between the two absolute angles of the pivot and missile, divide that by 25 and then turn your missile. Something like this:

piv_pitch#=entitypitch(pivot,1)
piv_yaw#=entityyaw(pivot,1)
piv_roll#=entityroll(pivot,1)
mis_pitch#=entitypitch(pivot,1)
mis_yaw#=entityyaw(pivot,1)
mis_roll#=entityroll(pivot,1)
TurnEntity missile,(piv_pitch-mis_pitch)/25,(piv_yaw-mis_yaw)/25,(piv_roll-mis_roll)/25


I haven't tested this obviously but you should get the idea.