Code Monkey home page Code Monkey logo

Comments (5)

NathanWolf avatar NathanWolf commented on June 9, 2024 1

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.

NathanWolf avatar NathanWolf commented on June 9, 2024 1

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.

NathanWolf avatar NathanWolf commented on June 9, 2024

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.

micahstubbs avatar micahstubbs commented on June 9, 2024

interesting. curious, how do the transform updates (e.g. teleportation) interfere with collision detection?

from saber.

micahstubbs avatar micahstubbs commented on June 9, 2024

ah interesting, thanks for explaining!

from saber.

Related Issues (2)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.