I don't understand. You know a Sprites' top left corner X and Y coordinate. You know its' Width and Height and you know if it intersects a point so if necessary you can calculate where every other part of the Sprite is located so what can't you do?Ramble...
I think (I should know) I was trying to say...I don't understand. You know a Sprites' top left corner X and Y coordinate. You know its' Width and Height and you know if it intersects a point so if necessary you can calculate where every other part of the Sprite is located so what can't you do?
Sub gw_CollisionMouse
Right=False
Left=False
Spr.Value=gw.Sprite1
ind=gw.SpriteIndex(gw.Sprite1)
Msgbox(ind)
'Check to the left for blockage
If gw.X<(Spr.X+7) AND gw.CheckForSpriteCollision(ind,Spr.X-2,Spr.Y,True,False)=-1 Then
Left=True
Right=False
Else If gw.X>(Spr.X+7) AND gw.SpriteIntersectsPoint(Spr.X+Spr.width+2,Spr.Y)=-1 Then
Right=True
Left=False
End If
If right Then
Msgbox("right")
Else If left Then
Msgbox("left")
Else
Msgbox("blocked")
End If
End Sub
If you mean rotate the bitmap when it is drawn then no. A Sprite itself is always rectangular although it doesn't necessarily appear so if the Sprites' bitmap has transparent parts. The way to simulate rotation would be to use an appropriate bitmap.Any way to control sprite rotation in code?
Is this on device or desktop and is it an optimised compiled application or in the IDE? Out of interest (because I might like to play with it!) which Task Manager are you using to alter the priority?I just noticed that there is a thread running a high priority that effects movement of Sprites.
We use cookies and similar technologies for the following purposes:
Do you accept cookies and these technologies?
We use cookies and similar technologies for the following purposes:
Do you accept cookies and these technologies?