hot to slowly rotate one object towards another

Blitz3D Forums/Blitz3D Programming/hot to slowly rotate one object towards another

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.

Function EntityPoint( Source , Target, MaxYawSpeed# , MaxPitchSpeed# )

  DY# = deltayaw( Source, Target )
  if abs( DY ) > MaxYawSpeed DY# = sgn( DY ) * MaxYawSpeed
  
  DP# = deltapitch( Source, Target )
  if abs( DP ) > MaxPitchSpeed DP = sgn( DP ) * MaxPitchSpeed

  turnentity Source, DP , DY , 0

end function