Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

AppGameKit Classic Chat / [bug] Diffrent result on collision shape (circle) depending on SetScale before or after SetShape

Author
Message
Dolmari
7
Years of Service
User Offline
Joined: 19th Sep 2017
Location:
Posted: 14th May 2018 20:48
It seems that SetSpriteScale gives a different effect depending on whether you have used it before or after the SetSpriteShape command with parameter 1 (circle).
It's about the scale of the collision shape, not sprite. The problem concerns only Circle shape. In the case of Box or Polygon, the order of commands does not affect the result.

Below is a simple example to reproduce this behaviour. Swap the order of Scale and Shape commands and you will get a different size of the collision shape.

(tested on AppGameKit Build 2018.05.02)

Bengismo
6
Years of Service
User Offline
Joined: 20th Nov 2017
Location: Yorkshire, England
Posted: 14th May 2018 21:12 Edited at: 14th May 2018 21:24
If you use SetSpriteShapeCircle() you can set whatever size circle you want to and the collision shape scales with the sprite scale if you scale it before or after setting scale.
Dolmari
7
Years of Service
User Offline
Joined: 19th Sep 2017
Location:
Posted: 14th May 2018 21:34
Thank you for the hint, but it does not change the fact that the bug I described above exists (and it will probably be easy to fix by TGC).
The problem is that scaling works, but in the case of a circle shape it works differently depending of order of commands. This can not be the correct behaviour because it is just inconsistent.
Paul Johnston
TGC Developer
22
Years of Service
User Offline
Joined: 16th Nov 2002
Location: United Kingdom
Posted: 22nd May 2018 15:52
Thanks, fixed for the next version

Login to post a reply

Server time is: 2024-11-18 12:40:28
Your offset time is: 2024-11-18 12:40:28