Rotating Turrets

Blitz3D Forums/Blitz3D Programming/Rotating Turrets

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.

Hi, I am having trouble getting turrets on space ships to rotate properly in Blitz. Ships can have several turrets, and each turret has the ship as its parent. Each turret consists of a base that can rotate left and right, and a barrel that can rotate up and down. The barrel entity is a child of the base, so it moves and rotates with it. I need to make it so that the turrets point at an enemy ship. I've tried using the deltapitch and deltayaw commands to turn each part individually, but I can't get it to work. The turrets either point in the wrong direction or just spin around. I don't understand whether the deltapitch and deltayaw commands will work when the source entity is parented to another entity. I may not have placed the joints correctly in Milkshape, which doesn't help.

Does anyone have any ideas?