Having problems when objects collide with actor when actor reaches a high y-coordinate

leoxyzleoxyz Member, PRO Posts: 6

Okay so I'm having issues when my main actor collides with objects I have falling down the y-axis, but only when he reaches a certain point on the y-axis (around y-coordinate 568).

My game display size is 320X568 and my scene is 320X4800 because the actor automatically moves up and the user only controls his left and right motion.

I use a spawner to spawn objects flying down the y-axis. So when the objects fly down and the actors (main actor and object) collide, something happens. I have the objects coming down and it works fine but once the actor moves up to a certain y-coordinate (around 568), nothing happens when the actors collide/touch.

How can I make it so the behaviors still occur even when the actor goes above y-coordinate 568? I hope I was clear, let me know if you have any questions. Any help is appreciated.

Comments

  • wcsd9739wcsd9739 Member Posts: 37

    Sounds pretty strange. I just tested a similar thing in a 320x480 project and it seems that whenever i set the falling object's Y to anything above 820 (regardless of its size) when previewed it is automatically deleted. I was already pretty sure GameSalad Previewer deletes any actor that goes too far out to save space, but I don't know if there's a way around it. Not sure if it's the same exact problem as you're having, but might be worth looking into.

  • HopscotchHopscotch Member, PRO Posts: 2,782

    @leoxyz, increase the density of the colliding objects, then they should react.

    If that does not help, then make sure that both objects are not too small, otherwise the physics engine may not detect a collision if the pass through each other too fast.

    @wcsd9739‌ , objects which go 500 pixels outside the scene borders do get deleted automatically. This is a good thing. If you need the extra space, then increase your scene size to accomodate.

  • leoxyzleoxyz Member, PRO Posts: 6

    Thank you so much @Hopscotch and @wcsd9739 for your help. Well, turns out my problem had a semi-simple solution.

    My spawner was spawning objects from coordinate 0 to coordinate 568 on y-axis. They kept appearing as I went up to xxxx coordinate on y-axis but since they were set to spawn from 0-568, nothing would happen when they collided above coordinate 568 even though they appeared.

    Thanks again guys for your help :)

Sign In or Register to comment.