You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Nov 12, 2024. It is now read-only.
I added two enemies and they are supposed to patrol back and forth in the open area between two walls. When I give either of them the body() attribute they get stuck and just sit still.
When I take it out, they float above the ground a bit but move. However, one of them goes halfway through a wall on the right side before the collision is detected (it responds normally to the barrier on the left.)
The second enemy, however, just ignores the right wall, goes through it, and keeps flying off the map.
I feel like I'm missing something basic here, but I can't figure it out. Any help much appreciated.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Hi -
I made a simple game on replit.
Code here: https://gist.github.com/dratner/14bfeac2d0d7e47bfcfb0f5fd915b848
Game here: https://bouncingcastle.danratner.repl.co/
I added two enemies and they are supposed to patrol back and forth in the open area between two walls. When I give either of them the body() attribute they get stuck and just sit still.
When I take it out, they float above the ground a bit but move. However, one of them goes halfway through a wall on the right side before the collision is detected (it responds normally to the barrier on the left.)
The second enemy, however, just ignores the right wall, goes through it, and keeps flying off the map.
I feel like I'm missing something basic here, but I can't figure it out. Any help much appreciated.
Thanks,
Dan
Beta Was this translation helpful? Give feedback.
All reactions