Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ;Very shitty example which probably won't work
- ;For left key only, cause I'm left handed and lazy <3
- Rotationspeed# = 2 ;Set what number Rotationspeed# should be
- Rotationaim# = 0 ;Set number for Rotationaim#, though it's going to be changed
- If (Rotationaim# < 0) Then Rotationaim# = 360 ;If the Y rotation of Rotationaim# is less than 0, make it 360
- If (Rotationaim# > 360) Then Rotationaim# = 0 ;If the Y rotation of Rotationaim# is more than 360, make it 0
- If (CamY < 0) Then CamY = 360 ;If the Y rotation of the cam is less than 0, make it 360
- If (CamY > 360) Then CamY = 0 ;If the Y rotation of the cam is more than 360, make it 0
- If (LeftKeyHold = True) Then ;If the left key is hold down (so it repeats)
- Rotationaim# = CamY - 90 ;Set the aim for rotating to at CamY - 90
- If (PlayerY > Rotationaim#) Then PlayerY = PlayerY - Rotationspeed# ;If the Player Y rotation is less than Rotationaim# (cam y rotation - 90)
- ;(so in what direction Sonic instantly would go)
- ;make it slowly rotate at the speed of Rotationspeed# towards Rotationaim#
- EndIf ;The end of this nice tale
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement