How to Rotateentity towards an object?

Blitz3D Forums/Blitz3D Programming/How to Rotateentity towards an object?

D_Town_Tony(Posted 2004) [#1]
I was wondering if anyone can tell me how to get the rotateentityvalue if I want to rotae an entity in the direction of an object. I don't want to use pointentity to get this is there any other way to do this?


GfK(Posted 2004) [#2]
You can use DeltaPitch/DeltaYaw and rotate the entity accordingly.


Rimmsy(Posted 2004) [#3]
try: http://blitzbasic.com/codearcs/codearcs.php?code=206
NOTE: chroma hasn't "public domained" it yet though.
or this:
http://blitzbasic.com/codearcs/codearcs.php?code=570


Rook Zimbabwe(Posted 2004) [#4]
You can simply use the pointentity command in B3d:
PointEntity entity,target{,roll#}

-RZ


Rook Zimbabwe(Posted 2004) [#5]
OK stupid and sleepless here (aka ME) didn't read the whole question... still you could use pointentity and then EntityDistance and EntityYaw and EntityRoll... I mean it does kind of work.


Rob(Posted 2004) [#6]
He clearly said he didn't want pointentity.

DeltaPitch and DeltaYaw return the difference in angle. Add or subtract these multiplied by a tiny number like 0.01 to smoothly rotate to face.