Problem with wrapping and collision
abacussssss
Member Posts: 2
in Tech Support
Why isn't this game working? The player is supposed to be allowed to change direction only when adjacent to ground, wrapping around when it hits the edge. But instead, it teleports around, disappearing at times. Is there a way to fix this?
Comments
Not sure why yet but if you pare it down to just the red Player actor (no ground actors) and just that actor's Otherwise section (the Every 0 Timer), it still teleports.
New to GameSalad? (FAQs) | Tutorials | Templates | Greenleaf Games | Educator & Certified GameSalad User
Okay, I think the problem is that you're essentially constraining self.Position.X to self.Position.X+40. This can cause problems. Instead, set a target and move to that:
New to GameSalad? (FAQs) | Tutorials | Templates | Greenleaf Games | Educator & Certified GameSalad User
Yep, that will move the actor to the right at a speed to 2,400 ppi !
I just tried that and it still doesn't work. Did I implement your suggestion incorrectly?