Coder Social home page Coder Social logo

Comments (2)

Goutte avatar Goutte commented on May 24, 2024

The first thing I'd try would be to add a Collision Shape as child of the Camera.

Since we're swapping the Transform of the Camera, I don't think it plays very well with collisions.

Perhaps by rewriting the function differently ?
Always setting the angle from the position, and letting the collision engine handle the position (using a Spring around the target, so that the Camera "slides" on walls neatly — means the zoom shenanigans are to be tweaked too) ?

Sadly i have some health, work and money issues to tend to, and I don't have the leisure to try my hand at this. You're welcome to try and push a merge request, though !

from godot-trackball-camera.

Goutte avatar Goutte commented on May 24, 2024

Perhaps there's a simpler way, but dumber : in apply_contraints(), check if the new position is in the walls, and if it is, push it out.

Probably inefficient, but perhaps there's a way.

from godot-trackball-camera.

Related Issues (20)

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.