RotateEntity problem

Blitz3D Forums/Blitz3D Beginners Area/RotateEntity problem

alterego(Posted 2008) [#1]
Following code works, but the description says, that pitch, roll and yaw are integers.
The entity really turns in floatingpoint steps.

....
RotateEntity name, EntityPitch(name)+0.1, EntityYaw(name), EntityRoll(name)
Text 335,400,Str EntityPitch(name)+" "
.....

My problem is that it only turns to 89.9999 degrees and ist stopped then.
By using TurnEntity there is no possibility to turn it less than one degree.
If you want entities to turn slowly how can this be managed and why does the float work?


DJWoodgate(Posted 2008) [#2]
Can't see where they are described as integers. Turnentity can turn something less than 1 degree. Refer to the docs. # indicates a floating point argument. The pitch value reported by Entitypitch only ranges from -90 to 90 degrees, by design. Yaw has a full -180 to 180 range and used together they encompass all directions. However feeding entity pitch, yaw and roll values back into rotateentity like you have will be prone to gimbal lock. Turnentity applies relative rotation using a different method that avoids this problem.


H. T. U.(Posted 2008) [#3]
As DJWoodgate mentioned, you would really want to use TurnEntity in this case.
try this:
TurnEntity name,0.1,0,0


alterego(Posted 2008) [#4]
RE: DJWoodgate, H.T.U

Thanks a lot for your help!
With type integer i really was not right, but the documentation does not say anything about limitations of stepsizes and maximums.
So please don't be angry at me, if i will continue asking questions.

Is there a better documentation of Blitz3D than the original one?


markcw(Posted 2008) [#5]
The latest Blitz3D documentation is for v1.88.

Click on Accounts->Product updates->Blitz3D Docs Pak V188->Install.


H. T. U.(Posted 2008) [#6]
Alterego, you've got a point, the documentation doesn't mention any limits. And don't worry, I'm not angry at anyone ;)