Comments (5)
I pushed a change that implements this. I'll make a new release with it soonish, but I'd like to get the environment detection working first.
Unfortunately I've realized this is a little problematic since the controller currently uses transform updates (e.g. teleportation) to move the saber around, which doesn't really get along well with collision detection.
Anyway, thanks for the suggestion!
from saber.
My (somewhat limited) understanding is that the physics system only works with impulses and velocities. Which makes sense, really. If you teleport an object from one side of a wall to the other side, it's not going to know you passed through it.
Similarly, if I teleport an object into another object it won't detect the collision.
I decided to just remove the collider on the saber for now, though I may have to put it back later if I add projectiles to hit. For now I'm doing collision detection myself with ray/box casts.
I have some sparks flying out of things you slice, which feels pretty nice. I'd like to make some decals that stay around to look like it's sliced through, if I can get that working fairly well I want to fix the icon then I'll release a new version.
from saber.
Nice idea! I was thinking of using the touchpad for changing saber style/color if/when I have different sabers, but that's probably better left in a menu anyway.
from saber.
interesting. curious, how do the transform updates (e.g. teleportation) interfere with collision detection?
from saber.
ah interesting, thanks for explaining!
from saber.
Related Issues (2)
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 saber.