Can one make the COLLISION BOX update manually during runtime? (HTML5 doesn't match a changed actor)

HymloeHymloe Member Posts: 1,651
edited September 2017 in Working with GS (PC)

Is there a way to make Game Salad update the Collision box for an actor at runtime?

Currently, if I spawn a 32x32 Tree actor, and then the actor itself has behaviours to randomise it's width and height, to say 128 x 64) - with Graphics > Horizontal and Vertical Wrap set to Tiling (32 x 32 texture) - the collision shape updates on Mac or Windows to match the size of the actor, but on HTML5, the collision shape remains at 32x32.

With Wrap modes set to Stretch, it still doesn't work, but kinda sorta works sometimes. Overall, it still doesn't work, though.

Is there a way for me to make the actor update it's collision shape to match the new size of my actor at runtime?

Or is this an ENGINE BUG that needs to be fixed by Game Salad?

The engine should obviously handle it the same on HTML5 as it does on Win and Mac. But if there was a work around that worked 100% of the time (updated the collision shape to actually match the actor) that would be nice to know.



  • HymloeHymloe Member Posts: 1,651

    You can see the problem (and a few others) demonstrated in this Game Salad project (made in the latest Windows version of the editor)...

    You can download the project here: (75kb)

    And you can play the HTML5 version of the project here...

    Here are the issues / bugs that the project illustrates...


    On Windows or Mac, if you play the game in the editor, the car (driven with arrow keys) will correctly collide with the trees - even when they change size at runtime. This is as it should be.

    BUT on HTML5, the car will not collide with the tree actors unless the car hits the original 32x32 size of the trees. (Interestingly, once the collision registers, the car is then pushed OUT to the extent of the actual size of the actor. So it's partially working, but the actual collision itself is not detected unless it hits the original 32x32 size. This trigger collider should update any time that the actor width and height updates at runtime!

    Desired result: Collision size of objects should always update to match the runtime width and height of the actor. [Need this to be fixed!]


    The bird actor in the middle of the level should play a tweeting sound positionally, and with a randomised pitch.

    On Mac and iOS, these things both work properly. But not so on other platforms.

    The project shows how on HTML5, Positional and Pitched sound does not work.
    Sounds cannot be pitched. And sounds cannot play positionally.

    On Windows, pitch adjustment works correctly, but Positional audio doesn't seem to work (in the Windows editor preview).

    Desired result: On HTML5, the Positional and Pitch features should both work properly! [Need these bugs to be fixed!]


    If text is displayed at a large size, there are unwanted "corruptions" of certain letters.

    Letters all look fine on Windows and Mac and iOS, but if displayed on HTML5, there are artifacts on some letters, such as "i" and "g" in the case of the font chosen in this demo project.

    Desired result: All fonts should display cleanly and properly on all output platforms, including HTML5. [Please fix!]


    If anyone wants to download the project and have a look for themselves, I'd very much appreciate any input into how these things might be fixed, or confirm in a message below that these seem to be engine bugs that need to be fixed at Game Salad HQ before any of these things can be resolved.


    All the best.

  • The_Gamesalad_GuruThe_Gamesalad_Guru Member Posts: 9,914

    Most times the physic bodies can't be changed at runtime. Best to have a seperate small actor.

Sign In or Register to comment.