uriel
(uriel)
October 15, 2009, 1:39am
1
Hello everybody,
i was looking at the forum with this but nothing really helpfull so i ask it by an other way:
i have this code wich is deprecated:
############################################################
Set the rotation values
rotate left/right (world coordinates)
rotLeftRight.setDRot( 0.0, 0.0, leftRight, False)
rotation up/down (local)
rotUpDown.setDRot( upDown, 0.0, 0.0, True)
############################################################
so i try to look at the new api but i understand nothing and my console says:
please use the dRot and uselocaldRot instead…
i don’t know how to replace manually these line of code…
if you can explain and tell me how to replace…i want to learn,please
thanks in advance
Monster
(Monster)
October 15, 2009, 4:22am
2
rotLeftRight.setDRot( 0.0, 0.0, leftRight, False)
=>
rotLeftRight.dRot=[ 0.0, 0.0, leftRight]
rotUpDown.setDRot( upDown, 0.0, 0.0, True)
=>
rotUpDown.dRot=[upDown, 0.0, 0.0]
rotUpDown.useLocalDRot # needs to be set just once or configured with the gui
Refer to http://www.blender.org/documentation/249PythonDoc/GE/GameTypes.KX_ObjectActuator-class.html#setDLoc for details
uriel
(uriel)
October 17, 2009, 4:47am
3
right thanks monster !
no more depreciated lines !
but 1 issue is stil there:
2 more ERROR in that small code !
here is the file (0.25mb)
please, can you tell me what’s wrong with it?
thanks
bye
EDIT: i’ve upload a new file with the error lines !