Comments (1)
After some research I find the bug lies in Physics2D.Raycast().
Instead of detecting collision tile by tile (like in Troley.Push()), I used only one Physics2D.Raycast() per laser segment to find collision in front of it.
But this method somehow misses some collision. I find it only works for some columns and doesn't work for others.
== Solution
Before finding the essential reason of missing collision detection, I solve this problem temporarily by adding Physics2DExt class to replace Physics2D when searching collision in one direction. Basically it uses the method in Troley (detecting collision tile by tile). We may use it in Troley.Push() as well to avoid a potential bug (infinite loop).
from cs7038.
Related Issues (20)
- 2 lasers one mirror - Test on Level 11
- Looped sfx do not resume when pause/unpause
- Fountain animation erratic when having two fountains next to player
- Pushing bug with multiple pushables.
- Laser depth visibility must improve HOT 3
- "Laser" speed HOT 2
- Pausing while washing hands HOT 1
- Squashed sound effect
- Level selector hangs up the first time HOT 2
- Level selector sliding to second+ page
- Google plus? HOT 3
- Star thump sound
- Animation bug with fountain and patient
- Vibrating for mobile phones
- Keyboard controls no longer work HOT 3
- The latest version does not compile! HOT 1
- Optimize Group Manager
- Sharing image url
- Encapsulating AudioSource HOT 1
- iOS portrait orientation
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from cs7038.