Jump to content
A 2021 backup has been restored. Forums are closed and work in progress. Join our Discord server for more updates! ×
SoaH City Message Board

[Help] Collision detection out of the "camera area"


Recommended Posts

This is a problem I discovered some hours ago while trying to program a badnik in Worlds Delta.

Any collision that happens out of the current "camera area" (by camera area, I mean what is currently visible on the screen) isn't detected. That results in some glitches, like, for example...

Candy_Gimmick2.png

Here we have this gimmick I created. A machine in the ceiling creates a pie from time to time, which falls to the conveyor belt and then is carried. It seemingly works nice, but if I jump (which will result in the conveyor belt not being in the "camera area" anymore), the collision won't be detected and the candy will either pass though the conveyor belt or get stuck on it if the conveyor belt returns to the camera area rapidly.

Badnik_Screenshot.png

A similar glitch also happens with this badnik. He flies from one side to another, then stops and creates a sphere, which will fall to the ground and explode on collision. At the moment of collision, the badnik will "reset" and will repeat everything it did. If the sphere is out of the "camera area" in the moment it would collide with the ground, the collision isn't detected and the sphere simply goes through the ground tile. Result: the badnik stays forever in the same place waiting for a collision that'll never happen.:asweatdrop:

The problem is that I need those collisions to be detected, otherwise it'll be almost impossible to program most of the gimmicks and badniks I have in mind. Does MMF2 or the Worlds/Worlds Delta engine work like that, or am I the only one with this problem?

(Obs.: If someone wants to look directly into the code, please say so, and I will send the download link of the MFA file via PM. I won't post anything in the topic because then anyone could steal what's in that file, and I don't want it to happen.)

Edit: One more thing. I've tested the badnik and Gimmick in Sonic Worlds 0.5 and in Sonic Worlds Delta 1.2, without any changes from the original code (except the badnik and gimmick code, of course). The problem happens in all of them.

Link to comment
Share on other sites

The conveyor belt is an Active Object, so this option will make no difference for it :P

Have you tried setting the "inactivate if too far" option for both conveyor belt and cupcake-thingy to "No"?

EDIT: Eventually, if you're gonna use this option, you'll have to make your own routine to deactivate it - by destroying it.

Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...