GithubHelp home page GithubHelp logo

cavaninicolas / mathsphysiquejv Goto Github PK

View Code? Open in Web Editor NEW
1.0 2.0 0.0 7.48 MB

Mirror of Small physics engine for video games as part of a UQAC project

Home Page: https://gitlab.com/CelestinML/mathsphysique.git

C++ 96.10% CMake 3.72% GLSL 0.18%
game-engine-3d cpp opengl simulation physics-simulation physics-engine

mathsphysiquejv's Introduction

Project description

This project aims to simulate basic physics principles. This first part is about simple particles' behaviors, and you will be able to shoot three types of particles with their specific attributes, and see their evolution in space.

Build Guide

Download the latest version of the project

Go to your build dir and compile the source using the root CMakeLists.txt

User Guide

Once the project is compiled, you will be able to run the executable named mainPhase4. The previous apps are still working.

Selecting the parameters

Once the executable is started, you will see a window called "Parameters". Open it and expand it to see all the parameters.

Here, you will be able to choose :

  • the car's linear velocity
  • the car's angular velocity (rotation)
  • several presets that will place a the plan's normal and the previous car parameters

If you modify these parameters, you have to click on "Apply changes" before running the simulation to see the changes. Except for the presets, these automatically Apply the changes.

If you want to apply gravity to the car, you have to click on "Apply gravity" before running the simulation.

Starting the simulation

Under the parameters section, you should see two buttons :

  • Run simulation
  • Pause simulation

You should click on "Run simulation" once you have all the appropriate settings. This will make the car move (except if you did not choose a linear velocity, and did not apply the gravity force). Once the car overlaps the plan, the simulation will automatically pause, meaning that the collision was detected. Sorry for not having implemented a Restart Button, you will have to close and restart the app to test the other presets.

Notes

The only plan that is visible is the one with the normal (0, 1, 0) and the offset 0. For now, we did not have time to make a corresponding mesh that would move and rotate according to the normal and the offset. Meaning that if you use the presets 2, 3 or 4, the visible plan in the scene is not the actual plan the physics engine is considering.

References

Here are the links to where we inspired our code from :

3D assets and Texture :

mathsphysiquejv's People

Contributors

cavaninicolas avatar celestinml avatar evamnt avatar

Stargazers

 avatar

Watchers

James Cloos avatar  avatar

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.