How to Rotateentity towards an object?
Blitz3D Forums/Blitz3D Programming/How to Rotateentity towards an object?
| ||
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? |
| ||
You can use DeltaPitch/DeltaYaw and rotate the entity accordingly. |
| ||
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 |
| ||
You can simply use the pointentity command in B3d:PointEntity entity,target{,roll#} -RZ |
| ||
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. |
| ||
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. |