-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Experiments with AI and physics #17
base: master
Are you sure you want to change the base?
Conversation
@@ -179,10 +198,49 @@ int main(int argc, char* argv[]) { | |||
boat.position.x = i * 12.0f; | |||
} | |||
|
|||
std::shared_ptr<Model> testModel = std::make_shared<Model>("data/model/test"); | |||
// std::shared_ptr<Model> testModel = std::make_shared<Model>("data/model/test"); | |||
std::shared_ptr<Model> testModel = std::make_shared<Model>("/home/fox/Data/Projects/boat-game-proto-data/data/monaco"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Needs fixing locally
|
||
// Load particles from file | ||
{ | ||
FILE* f = fopen("/home/fox/box-constraint.obj", "rb"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Needs fixing locally.
You can craft your own object using blender, including hinges and so on; see "Articulated Bodies" at http://graphics.cs.cmu.edu/nsp/course/15-869/2006/papers/jakobsen.htm.
If you change the mesh from the one below, then you also have to fix the indices in the source-code.
This file is:
# Blender v2.79 (sub 0) OBJ File: ''
# www.blender.org
mtllib box-constraint.mtl
o Cube_Cube.001
v -1.000000 -1.000000 1.000000
v -1.000000 1.000000 1.000000
v -1.000000 -1.000000 -1.000000
v -1.000000 1.000000 -1.000000
v 1.000000 -1.000000 1.000000
v 1.000000 1.000000 1.000000
v 1.000000 -1.000000 -1.000000
v 1.000000 1.000000 -1.000000
l 3 1
l 1 2
l 2 4
l 4 3
l 7 3
l 4 8
l 8 7
l 5 7
l 8 6
l 6 5
l 1 5
l 6 2
l 1 6
l 2 5
l 3 8
l 4 7
l 3 5
l 1 7
l 4 6
l 2 8
l 5 8
l 6 7
l 2 3
l 1 4
auto& x2 = particles[c.b].m_x; | ||
auto delta = x2 - x1; | ||
#if 1 | ||
float deltalength = glm::length(delta); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This can get unstable and you want to have code to cope with this.
Not to be merged. Only uploading incomplete work for archival purposes.
The "Monaco" course is not being uploaded, but here's an old screenshot of the old blockout in Blender:
The actual track layout was a reimagined Monaco F1 track, with a custom theme (jungle, port, tunnels).