Pointentity Problem

Blitz3D Forums/Blitz3D Programming/Pointentity Problem

The forum is locked. These are the original blitzbasic.com forums, kept so they can still be read. No new topics, replies or edits can be made here. To join in, head over to the Blitz3D+ forums.

Of course you would only use a slight turn if you knew that the singularity was going to occur before you used aligntovector. Is that really such a hardship?

function MYaligntoVector( entity, vx#, vy#, axis = 1, rate# = 1 )

   if vx = 0 and vy < 0  turnentity entity, 0,0,-.0001
   aligntovector entity, vx, vy, 0, axis, rate#

end function


With the deltaroll function you will only ever return -180 or 180 when the target is directly behind the missile so it will work perfectly. Trust me, I have had to use it myself when doing 2d in 3d on a single plane. Alternatively just use the x/z plane and deltayaw - it's six and half a dozen.

BTW, I use aligntovector on the z axis for those missiles.