Rotation/orientaton problem

Blitz3D Forums/Blitz3D Programming/Rotation/orientaton problem

Makepool(Posted 2004) [#1]
Ok I want to make a turret on a tank that swivels and looks exactly at what it’s firing at, this is a simple matter while the tanks orientation remains flat and unchanged, however the tank moves over uneven terrain and it’s orientation changes. How can I still get the tank turret to properly point at it’s target, baring in mind I want to be able to turn the turret and move the gun up and down using the turnentity command.

Suggestions would be greatly appreciated!


DarkEagle(Posted 2004) [#2]
pointentity turret, target

or did i miss something?


Jeppe Nielsen(Posted 2004) [#3]
Use, something like:
PointEntity turret,target
RotateEntity turret,0,EntityYaw(turret),0



eBusiness(Posted 2004) [#4]
I hope you have 3 entities: The tank, the turret house, and the turret. And then you need some math, hmmm... The problem is to make the turret house rotate correctly, right?


Andy(Posted 2004) [#5]
The turret should be in 2 parts, the turret itself and the gun. pointentity the gun towards the target and then turn the turret based on the gun.

Andy