Compare commits
No commits in common. "4a3b71d585f795fa4e2cec144dad405e1f688910" and "9927149527365ed1cfc6454da8759952689fb0ee" have entirely different histories.
4a3b71d585
...
9927149527
2
.gitignore
vendored
2
.gitignore
vendored
|
@ -14,5 +14,3 @@ build/going.pck
|
|||
build/going.x86_64
|
||||
build/going.exe
|
||||
build.zip
|
||||
|
||||
*.o
|
||||
|
|
|
@ -31,10 +31,10 @@
|
|||
"to_port": 1
|
||||
},
|
||||
{
|
||||
"from": "splatter_color",
|
||||
"from": "scratches",
|
||||
"from_port": 0,
|
||||
"to": "blend2_2",
|
||||
"to_port": 1
|
||||
"to": "colorize",
|
||||
"to_port": 0
|
||||
},
|
||||
{
|
||||
"from": "colorize",
|
||||
|
@ -43,46 +43,10 @@
|
|||
"to_port": 0
|
||||
},
|
||||
{
|
||||
"from": "fbm2",
|
||||
"from": "splatter_color",
|
||||
"from_port": 0,
|
||||
"to": "colorize",
|
||||
"to_port": 0
|
||||
},
|
||||
{
|
||||
"from": "graph",
|
||||
"from_port": 1,
|
||||
"to": "splatter_color_3",
|
||||
"to_port": 0
|
||||
},
|
||||
{
|
||||
"from": "shape_2",
|
||||
"from_port": 0,
|
||||
"to": "splatter_color_3",
|
||||
"to": "blend2_2",
|
||||
"to_port": 1
|
||||
},
|
||||
{
|
||||
"from": "splatter_color_3",
|
||||
"from_port": 0,
|
||||
"to": "buffer_3",
|
||||
"to_port": 0
|
||||
},
|
||||
{
|
||||
"from": "buffer_3",
|
||||
"from_port": 0,
|
||||
"to": "splatter_color_4",
|
||||
"to_port": 0
|
||||
},
|
||||
{
|
||||
"from": "splatter_color_4",
|
||||
"from_port": 0,
|
||||
"to": "normal_map2",
|
||||
"to_port": 0
|
||||
},
|
||||
{
|
||||
"from": "normal_map2",
|
||||
"from_port": 0,
|
||||
"to": "Material",
|
||||
"to_port": 4
|
||||
}
|
||||
],
|
||||
"label": "Graph",
|
||||
|
@ -101,8 +65,8 @@
|
|||
},
|
||||
"name": "Material",
|
||||
"node_position": {
|
||||
"x": -198.423416,
|
||||
"y": 226.924652
|
||||
"x": 367.611938,
|
||||
"y": 243.147049
|
||||
},
|
||||
"parameters": {
|
||||
"albedo_color": {
|
||||
|
@ -116,7 +80,7 @@
|
|||
"depth_scale": 0.5,
|
||||
"emission_energy": 1,
|
||||
"flags_transparent": true,
|
||||
"metallic": 0.5,
|
||||
"metallic": 0,
|
||||
"normal": 1,
|
||||
"roughness": 1,
|
||||
"size": 11,
|
||||
|
@ -128,12 +92,12 @@
|
|||
{
|
||||
"name": "splatter_color",
|
||||
"node_position": {
|
||||
"x": -791.793091,
|
||||
"y": 317.725281
|
||||
"x": -677.745056,
|
||||
"y": 267.207703
|
||||
},
|
||||
"parameters": {
|
||||
"count": 153,
|
||||
"opacity": 0.46,
|
||||
"count": 215,
|
||||
"opacity": 0,
|
||||
"rotate": 33.6,
|
||||
"scale": 0,
|
||||
"scale_x": 0.5,
|
||||
|
@ -142,7 +106,6 @@
|
|||
"variations": false
|
||||
},
|
||||
"seed_int": 1176364672,
|
||||
"seed_locked": true,
|
||||
"type": "splatter_color"
|
||||
},
|
||||
{
|
||||
|
@ -213,6 +176,12 @@
|
|||
"to": "mirror",
|
||||
"to_port": 0
|
||||
},
|
||||
{
|
||||
"from": "fbm2",
|
||||
"from_port": 0,
|
||||
"to": "math_8",
|
||||
"to_port": 1
|
||||
},
|
||||
{
|
||||
"from": "math_7",
|
||||
"from_port": 0,
|
||||
|
@ -225,12 +194,6 @@
|
|||
"to": "colorize_2",
|
||||
"to_port": 0
|
||||
},
|
||||
{
|
||||
"from": "math_8",
|
||||
"from_port": 0,
|
||||
"to": "math",
|
||||
"to_port": 1
|
||||
},
|
||||
{
|
||||
"from": "colorize_2",
|
||||
"from_port": 0,
|
||||
|
@ -238,66 +201,24 @@
|
|||
"to_port": 0
|
||||
},
|
||||
{
|
||||
"from": "math",
|
||||
"from": "math_8",
|
||||
"from_port": 0,
|
||||
"to": "decompose",
|
||||
"to_port": 0
|
||||
"to": "math",
|
||||
"to_port": 1
|
||||
},
|
||||
{
|
||||
"from": "combine",
|
||||
"from": "math",
|
||||
"from_port": 0,
|
||||
"to": "gen_outputs",
|
||||
"to_port": 1
|
||||
},
|
||||
{
|
||||
"from": "decompose",
|
||||
"from_port": 0,
|
||||
"to": "combine",
|
||||
"to_port": 0
|
||||
},
|
||||
{
|
||||
"from": "decompose",
|
||||
"from_port": 1,
|
||||
"to": "combine",
|
||||
"to_port": 1
|
||||
},
|
||||
{
|
||||
"from": "decompose",
|
||||
"from_port": 2,
|
||||
"to": "combine",
|
||||
"to_port": 2
|
||||
},
|
||||
{
|
||||
"from": "math",
|
||||
"from_port": 0,
|
||||
"to": "math_2",
|
||||
"to_port": 0
|
||||
},
|
||||
{
|
||||
"from": "math_2",
|
||||
"from_port": 0,
|
||||
"to": "combine",
|
||||
"to_port": 3
|
||||
},
|
||||
{
|
||||
"from": "fbm2",
|
||||
"from_port": 0,
|
||||
"to": "math_9",
|
||||
"to_port": 0
|
||||
},
|
||||
{
|
||||
"from": "math_9",
|
||||
"from_port": 0,
|
||||
"to": "math_8",
|
||||
"to_port": 1
|
||||
}
|
||||
],
|
||||
"label": "leaf",
|
||||
"longdesc": "",
|
||||
"name": "graph",
|
||||
"node_position": {
|
||||
"x": -1546.436768,
|
||||
"y": 284.510437
|
||||
"x": -1656.337646,
|
||||
"y": 239.964798
|
||||
},
|
||||
"nodes": [
|
||||
{
|
||||
|
@ -538,7 +459,7 @@
|
|||
"name": "math_7",
|
||||
"node_position": {
|
||||
"x": 242.193024,
|
||||
"y": -555.516174
|
||||
"y": -555.033875
|
||||
},
|
||||
"parameters": {
|
||||
"clamp": false,
|
||||
|
@ -552,15 +473,15 @@
|
|||
{
|
||||
"name": "fbm2",
|
||||
"node_position": {
|
||||
"x": -31.397236,
|
||||
"y": -291.948822
|
||||
"x": 203.57576,
|
||||
"y": -335.872437
|
||||
},
|
||||
"parameters": {
|
||||
"folds": 0,
|
||||
"iterations": 5,
|
||||
"noise": 3,
|
||||
"offset": 0,
|
||||
"persistence": 0.32,
|
||||
"persistence": 0.3,
|
||||
"scale_x": 8,
|
||||
"scale_y": 7
|
||||
},
|
||||
|
@ -571,13 +492,13 @@
|
|||
"name": "math_8",
|
||||
"node_position": {
|
||||
"x": 497.395172,
|
||||
"y": -566.87323
|
||||
"y": -566.178772
|
||||
},
|
||||
"parameters": {
|
||||
"clamp": true,
|
||||
"clamp": false,
|
||||
"default_in1": 0,
|
||||
"default_in2": 0,
|
||||
"op": 1
|
||||
"op": 2
|
||||
},
|
||||
"seed_int": 0,
|
||||
"type": "math"
|
||||
|
@ -601,24 +522,24 @@
|
|||
},
|
||||
{
|
||||
"a": 1,
|
||||
"b": 0,
|
||||
"g": 0,
|
||||
"b": 1,
|
||||
"g": 1,
|
||||
"pos": 0.000001,
|
||||
"r": 0
|
||||
"r": 1
|
||||
},
|
||||
{
|
||||
"a": 1,
|
||||
"b": 0.080719,
|
||||
"g": 0.134069,
|
||||
"b": 0.17453,
|
||||
"g": 0.519531,
|
||||
"pos": 0.028095,
|
||||
"r": 0.179688
|
||||
"r": 0.201483
|
||||
},
|
||||
{
|
||||
"a": 1,
|
||||
"b": 0.284546,
|
||||
"g": 0.392838,
|
||||
"pos": 0.683393,
|
||||
"r": 0.433594
|
||||
"b": 0.109985,
|
||||
"g": 0.207031,
|
||||
"pos": 0.821499,
|
||||
"r": 0.163057
|
||||
}
|
||||
],
|
||||
"type": "Gradient"
|
||||
|
@ -645,8 +566,8 @@
|
|||
{
|
||||
"name": "gen_outputs",
|
||||
"node_position": {
|
||||
"x": 1603.897461,
|
||||
"y": -573.653137
|
||||
"x": 1041.897461,
|
||||
"y": -436.653137
|
||||
},
|
||||
"parameters": {
|
||||
|
||||
|
@ -682,8 +603,8 @@
|
|||
{
|
||||
"name": "math",
|
||||
"node_position": {
|
||||
"x": 769.161072,
|
||||
"y": -479.326324
|
||||
"x": 721.161072,
|
||||
"y": -414.326324
|
||||
},
|
||||
"parameters": {
|
||||
"clamp": true,
|
||||
|
@ -693,60 +614,6 @@
|
|||
},
|
||||
"seed_int": 0,
|
||||
"type": "math"
|
||||
},
|
||||
{
|
||||
"name": "decompose",
|
||||
"node_position": {
|
||||
"x": 1070.507202,
|
||||
"y": -476.516388
|
||||
},
|
||||
"parameters": {
|
||||
|
||||
},
|
||||
"seed_int": 0,
|
||||
"type": "decompose"
|
||||
},
|
||||
{
|
||||
"name": "combine",
|
||||
"node_position": {
|
||||
"x": 1412.107178,
|
||||
"y": -478.596375
|
||||
},
|
||||
"parameters": {
|
||||
|
||||
},
|
||||
"seed_int": 0,
|
||||
"type": "combine"
|
||||
},
|
||||
{
|
||||
"name": "math_2",
|
||||
"node_position": {
|
||||
"x": 1024.507202,
|
||||
"y": -332.516388
|
||||
},
|
||||
"parameters": {
|
||||
"clamp": false,
|
||||
"default_in1": 0,
|
||||
"default_in2": 1,
|
||||
"op": 15
|
||||
},
|
||||
"seed_int": 0,
|
||||
"type": "math"
|
||||
},
|
||||
{
|
||||
"name": "math_9",
|
||||
"node_position": {
|
||||
"x": 249.777237,
|
||||
"y": -324.944916
|
||||
},
|
||||
"parameters": {
|
||||
"clamp": false,
|
||||
"default_in1": 0,
|
||||
"default_in2": 0.3,
|
||||
"op": 2
|
||||
},
|
||||
"seed_int": 0,
|
||||
"type": "math"
|
||||
}
|
||||
],
|
||||
"parameters": {
|
||||
|
@ -756,12 +623,43 @@
|
|||
"shortdesc": "",
|
||||
"type": "graph"
|
||||
},
|
||||
{
|
||||
"name": "colorize",
|
||||
"node_position": {
|
||||
"x": -423.768982,
|
||||
"y": -8.696673
|
||||
},
|
||||
"parameters": {
|
||||
"gradient": {
|
||||
"interpolation": 1,
|
||||
"points": [
|
||||
{
|
||||
"a": 1,
|
||||
"b": 0,
|
||||
"g": 0,
|
||||
"pos": 0,
|
||||
"r": 0
|
||||
},
|
||||
{
|
||||
"a": 1,
|
||||
"b": 0.040283,
|
||||
"g": 0.108828,
|
||||
"pos": 0.648929,
|
||||
"r": 0.128906
|
||||
}
|
||||
],
|
||||
"type": "Gradient"
|
||||
}
|
||||
},
|
||||
"seed_int": 0,
|
||||
"type": "colorize"
|
||||
},
|
||||
{
|
||||
"generic_size": 1,
|
||||
"name": "blend2_2",
|
||||
"node_position": {
|
||||
"x": -489.832764,
|
||||
"y": 229.591202
|
||||
"x": -232.763931,
|
||||
"y": 222.17923
|
||||
},
|
||||
"parameters": {
|
||||
"amount1": 1,
|
||||
|
@ -773,11 +671,11 @@
|
|||
{
|
||||
"name": "splatter_color_2",
|
||||
"node_position": {
|
||||
"x": -1339.98645,
|
||||
"y": 306.279388
|
||||
"x": -1449.887329,
|
||||
"y": 262.733795
|
||||
},
|
||||
"parameters": {
|
||||
"count": 100,
|
||||
"count": 51,
|
||||
"opacity": 0,
|
||||
"rotate": 180,
|
||||
"scale": 0,
|
||||
|
@ -786,15 +684,14 @@
|
|||
"select_inputs": 0,
|
||||
"variations": false
|
||||
},
|
||||
"seed_int": 1416378624,
|
||||
"seed_locked": true,
|
||||
"seed_int": 0,
|
||||
"type": "splatter_color"
|
||||
},
|
||||
{
|
||||
"name": "buffer_2",
|
||||
"node_position": {
|
||||
"x": -1043.768799,
|
||||
"y": 313.091156
|
||||
"x": -1153.669678,
|
||||
"y": 269.545532
|
||||
},
|
||||
"parameters": {
|
||||
"size": 11
|
||||
|
@ -806,11 +703,11 @@
|
|||
{
|
||||
"name": "shape_2",
|
||||
"node_position": {
|
||||
"x": -1585.778931,
|
||||
"y": 408.345734
|
||||
"x": -1695.679688,
|
||||
"y": 364.80014
|
||||
},
|
||||
"parameters": {
|
||||
"edge": 0,
|
||||
"edge": 0.2,
|
||||
"radius": 0.906667,
|
||||
"shape": 0,
|
||||
"sides": 2
|
||||
|
@ -819,121 +716,21 @@
|
|||
"type": "shape"
|
||||
},
|
||||
{
|
||||
"name": "colorize",
|
||||
"name": "scratches",
|
||||
"node_position": {
|
||||
"x": -747.389404,
|
||||
"y": 224.760132
|
||||
"x": -697.072693,
|
||||
"y": -39.653183
|
||||
},
|
||||
"parameters": {
|
||||
"gradient": {
|
||||
"interpolation": 1,
|
||||
"points": [
|
||||
{
|
||||
"a": 1,
|
||||
"b": 0.031738,
|
||||
"g": 0.104694,
|
||||
"pos": 0,
|
||||
"r": 0.15625
|
||||
"angle": 90,
|
||||
"layers": 12,
|
||||
"length": 1,
|
||||
"randomness": 0,
|
||||
"waviness": 0.51,
|
||||
"width": 1
|
||||
},
|
||||
{
|
||||
"a": 1,
|
||||
"b": 0.038681,
|
||||
"g": 0.114346,
|
||||
"pos": 1,
|
||||
"r": 0.253906
|
||||
}
|
||||
],
|
||||
"type": "Gradient"
|
||||
}
|
||||
},
|
||||
"seed_int": 0,
|
||||
"type": "colorize"
|
||||
},
|
||||
{
|
||||
"name": "fbm2",
|
||||
"node_position": {
|
||||
"x": -1060.343384,
|
||||
"y": 59.759666
|
||||
},
|
||||
"parameters": {
|
||||
"folds": 0,
|
||||
"iterations": 5,
|
||||
"noise": 0,
|
||||
"offset": 0,
|
||||
"persistence": 0.5,
|
||||
"scale_x": 10,
|
||||
"scale_y": 10
|
||||
},
|
||||
"seed_int": 1560802304,
|
||||
"type": "fbm2"
|
||||
},
|
||||
{
|
||||
"name": "splatter_color_3",
|
||||
"node_position": {
|
||||
"x": -1343.273438,
|
||||
"y": 560.172607
|
||||
},
|
||||
"parameters": {
|
||||
"count": 100,
|
||||
"opacity": 0,
|
||||
"rotate": 180,
|
||||
"scale": 0,
|
||||
"scale_x": 0.05,
|
||||
"scale_y": 0.05,
|
||||
"select_inputs": 0,
|
||||
"variations": false
|
||||
},
|
||||
"seed_int": 1416378624,
|
||||
"seed_locked": true,
|
||||
"type": "splatter_color"
|
||||
},
|
||||
{
|
||||
"name": "splatter_color_4",
|
||||
"node_position": {
|
||||
"x": -786.262329,
|
||||
"y": 577.464539
|
||||
},
|
||||
"parameters": {
|
||||
"count": 153,
|
||||
"opacity": 0,
|
||||
"rotate": 33.6,
|
||||
"scale": 0,
|
||||
"scale_x": 0.5,
|
||||
"scale_y": 0.5,
|
||||
"select_inputs": 0,
|
||||
"variations": false
|
||||
},
|
||||
"seed_int": 1176364672,
|
||||
"seed_locked": true,
|
||||
"type": "splatter_color"
|
||||
},
|
||||
{
|
||||
"name": "buffer_3",
|
||||
"node_position": {
|
||||
"x": -1041.671997,
|
||||
"y": 569.661011
|
||||
},
|
||||
"parameters": {
|
||||
"size": 11
|
||||
},
|
||||
"seed_int": 0,
|
||||
"type": "buffer",
|
||||
"version": 1
|
||||
},
|
||||
{
|
||||
"name": "normal_map2",
|
||||
"node_position": {
|
||||
"x": -492.839508,
|
||||
"y": 579.223999
|
||||
},
|
||||
"parameters": {
|
||||
"buffer": 1,
|
||||
"param2": 0,
|
||||
"size": 11,
|
||||
"strength": 0.04
|
||||
},
|
||||
"seed_int": 0,
|
||||
"type": "normal_map2"
|
||||
"seed_int": 1348632320,
|
||||
"type": "scratches"
|
||||
}
|
||||
],
|
||||
"parameters": {
|
||||
|
|
|
@ -25,7 +25,6 @@ void PlayerBody::_bind_methods() {
|
|||
BIND_PROPERTY(Variant::FLOAT, target_speed);
|
||||
BIND_PROPERTY(Variant::FLOAT, split_step_time);
|
||||
BIND_PROPERTY(Variant::FLOAT, split_step_stop_time);
|
||||
BIND_PROPERTY(Variant::VECTOR2, jump_impulse);
|
||||
BIND_PROPERTY(Variant::FLOAT, model_lean);
|
||||
BIND_PROPERTY(Variant::FLOAT, model_lean_speed);
|
||||
}
|
||||
|
@ -166,14 +165,6 @@ double PlayerBody::get_split_step_stop_time() const {
|
|||
return this->split_step_stop_time;
|
||||
}
|
||||
|
||||
void PlayerBody::set_jump_impulse(Vector2 value) {
|
||||
this->jump_impulse = value;
|
||||
}
|
||||
|
||||
Vector2 PlayerBody::get_jump_impulse() const {
|
||||
return this->jump_impulse;
|
||||
}
|
||||
|
||||
void PlayerBody::set_model_lean(float value) {
|
||||
this->model_lean = value;
|
||||
}
|
||||
|
|
|
@ -38,8 +38,6 @@ public:
|
|||
double get_split_step_time() const;
|
||||
void set_split_step_stop_time(double value);
|
||||
double get_split_step_stop_time() const;
|
||||
void set_jump_impulse(Vector2 value);
|
||||
Vector2 get_jump_impulse() const;
|
||||
void set_model_lean(float value);
|
||||
float get_model_lean() const;
|
||||
void set_model_lean_speed(float value);
|
||||
|
@ -59,7 +57,6 @@ private:
|
|||
float target_speed{30.f};
|
||||
double split_step_time{0.5};
|
||||
double split_step_stop_time{0.5};
|
||||
Vector2 jump_impulse{5.f, 5.f};
|
||||
float max_speed_fov{100.f};
|
||||
float min_fov{80.f};
|
||||
double max_delta_fov{100.f};
|
||||
|
|
BIN
modules/going/player_body.linuxbsd.editor.dev.x86_64.llvm.o
Normal file
BIN
modules/going/player_body.linuxbsd.editor.dev.x86_64.llvm.o
Normal file
Binary file not shown.
|
@ -71,7 +71,7 @@ void RunningState::physics_process(double delta) {
|
|||
: float(this->get_body()->get_acceleration() * delta) // in-motion velocity
|
||||
)
|
||||
};
|
||||
this->get_body()->set_velocity(current.move_toward(desired, speed_delta) + Vector3{0.f, -0.01f, 0.f});
|
||||
this->get_body()->set_velocity(current.move_toward(desired, speed_delta));
|
||||
}
|
||||
|
||||
void RunningState::state_exited() {
|
||||
|
@ -82,12 +82,10 @@ void RunningState::state_exited() {
|
|||
PlayerState::StateID SplitStepState::get_next_state() const {
|
||||
if(!this->get_body()->is_on_floor()) {
|
||||
return FallingState::get_class_static();
|
||||
} else if(this->timer <= 0.0 && Input::get_singleton()->is_action_pressed("jump")) {
|
||||
return JumpingState::get_class_static();
|
||||
} else if(this->timer <= 0.0) {
|
||||
return RunningState::get_class_static();
|
||||
} else {
|
||||
return self_type::get_class_static();
|
||||
return this->timer <= 0.0
|
||||
? RunningState::get_class_static()
|
||||
: self_type::get_class_static();
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -133,31 +131,6 @@ void FallingState::process(double delta) {
|
|||
this->get_body()->set_velocity((flattened - (flattened * 0.025f)) + Vector3{0.f, current.y - float(9.8 * delta), 0.f});
|
||||
}
|
||||
|
||||
PlayerState::StateID JumpingState::get_next_state() const {
|
||||
if(this->get_body()->get_velocity().y <= 0.f) {
|
||||
return FallingState::get_class_static();
|
||||
} else {
|
||||
return self_type::get_class_static();
|
||||
}
|
||||
}
|
||||
|
||||
void JumpingState::state_entered() {
|
||||
Vector3 const current{this->get_body()->get_velocity()};
|
||||
Vector2 const impulse{this->get_body()->get_jump_impulse()};
|
||||
float const force{(Vector2{current.x, current.z}.length() / this->get_body()->get_target_speed())};
|
||||
this->get_body()->set_velocity( (
|
||||
Vector3{current.x, impulse.y, current.z}
|
||||
+ current.normalized() * impulse.x
|
||||
) * force);
|
||||
this->get_body()->get_anim()->play("jump");
|
||||
}
|
||||
|
||||
void JumpingState::process(double delta) {
|
||||
Vector3 const current{this->get_body()->get_velocity()};
|
||||
Vector3 const flattened{current.x, 0.f, current.z};
|
||||
this->get_body()->set_velocity((flattened - (flattened * 0.025f)) + Vector3{0.f, current.y - float(9.8 * delta), 0.f});
|
||||
}
|
||||
|
||||
void PlayerStateMachine::_bind_methods() {
|
||||
}
|
||||
|
||||
|
@ -189,7 +162,6 @@ void PlayerStateMachine::ready() {
|
|||
this->add_state<RunningState>();
|
||||
this->add_state<SplitStepState>();
|
||||
this->add_state<FallingState>();
|
||||
this->add_state<JumpingState>();
|
||||
}
|
||||
|
||||
void PlayerStateMachine::try_transition() {
|
||||
|
|
|
@ -65,14 +65,6 @@ public:
|
|||
virtual void process(double delta) override;
|
||||
};
|
||||
|
||||
class JumpingState : public PlayerState {
|
||||
GDCLASS(JumpingState, PlayerState);
|
||||
public:
|
||||
virtual StateID get_next_state() const override;
|
||||
virtual void state_entered() override;
|
||||
virtual void process(double delta) override;
|
||||
};
|
||||
|
||||
class PlayerStateMachine : public Node {
|
||||
GDCLASS(PlayerStateMachine, Node);
|
||||
static void _bind_methods();
|
||||
|
|
|
@ -13,8 +13,6 @@ void initialize_going_module(ModuleInitializationLevel p_level) {
|
|||
ClassDB::register_class<StandingState>();
|
||||
ClassDB::register_class<RunningState>();
|
||||
ClassDB::register_class<SplitStepState>();
|
||||
ClassDB::register_class<FallingState>();
|
||||
ClassDB::register_class<JumpingState>();
|
||||
ClassDB::register_class<PlayerStateMachine>();
|
||||
}
|
||||
|
||||
|
|
|
@ -1,14 +1,10 @@
|
|||
[gd_resource type="StandardMaterial3D" load_steps=5 format=2]
|
||||
[ext_resource path="forest_background_albedo.png" type="Texture" id=1]
|
||||
[ext_resource path="forest_background_normal.png" type="Texture" id=3]
|
||||
[gd_resource type="StandardMaterial3D" load_steps=2 format=3 uid="uid://djdxb1ptl4fkm"]
|
||||
|
||||
[ext_resource type="Texture2D" uid="uid://b2jg52p2jp4m6" path="res://materials/forest_background_albedo.png" id="1"]
|
||||
|
||||
[resource]
|
||||
albedo_color = Color(1, 1, 1, 1)
|
||||
albedo_texture = ExtResource( 1 )
|
||||
metallic = 0.5
|
||||
roughness = 1
|
||||
normal_enabled = true
|
||||
normal_scale = 1
|
||||
normal_texture = ExtResource( 3 )
|
||||
|
||||
|
||||
|
||||
shading_mode = 0
|
||||
diffuse_mode = 3
|
||||
specular_mode = 2
|
||||
albedo_color = Color(0.262932, 0.262932, 0.262932, 1)
|
||||
albedo_texture = ExtResource("1")
|
||||
|
|
Binary file not shown.
Before Width: | Height: | Size: 6.2 MiB After Width: | Height: | Size: 6.5 MiB |
Binary file not shown.
Before Width: | Height: | Size: 9.2 MiB |
|
@ -1,34 +0,0 @@
|
|||
[remap]
|
||||
|
||||
importer="texture"
|
||||
type="CompressedTexture2D"
|
||||
uid="uid://boxhd026e1ohc"
|
||||
path="res://.godot/imported/forest_background_normal.png-cc0828bc4cebd94b47dfb57e8f90a93e.ctex"
|
||||
metadata={
|
||||
"vram_texture": false
|
||||
}
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://materials/forest_background_normal.png"
|
||||
dest_files=["res://.godot/imported/forest_background_normal.png-cc0828bc4cebd94b47dfb57e8f90a93e.ctex"]
|
||||
|
||||
[params]
|
||||
|
||||
compress/mode=0
|
||||
compress/high_quality=false
|
||||
compress/lossy_quality=0.7
|
||||
compress/hdr_compression=1
|
||||
compress/normal_map=0
|
||||
compress/channel_pack=0
|
||||
mipmaps/generate=false
|
||||
mipmaps/limit=-1
|
||||
roughness/mode=0
|
||||
roughness/src_normal=""
|
||||
process/fix_alpha_border=true
|
||||
process/premult_alpha=false
|
||||
process/normal_map_invert_y=false
|
||||
process/hdr_as_srgb=false
|
||||
process/hdr_clamp_exposure=false
|
||||
process/size_limit=0
|
||||
detect_3d/compress_to=1
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
|
@ -1,60 +0,0 @@
|
|||
[remap]
|
||||
|
||||
importer="scene"
|
||||
importer_version=1
|
||||
type="PackedScene"
|
||||
uid="uid://5cfl3xu1861l"
|
||||
path="res://.godot/imported/level.blend-7249bfeba9b08006b88dc69b8212480c.scn"
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://models/terrains/level.blend"
|
||||
dest_files=["res://.godot/imported/level.blend-7249bfeba9b08006b88dc69b8212480c.scn"]
|
||||
|
||||
[params]
|
||||
|
||||
nodes/root_type=""
|
||||
nodes/root_name=""
|
||||
nodes/apply_root_scale=true
|
||||
nodes/root_scale=1.0
|
||||
nodes/import_as_skeleton_bones=false
|
||||
nodes/use_node_type_suffixes=true
|
||||
meshes/ensure_tangents=true
|
||||
meshes/generate_lods=true
|
||||
meshes/create_shadow_meshes=true
|
||||
meshes/light_baking=1
|
||||
meshes/lightmap_texel_size=0.2
|
||||
meshes/force_disable_compression=false
|
||||
skins/use_named_skins=true
|
||||
animation/import=true
|
||||
animation/fps=30
|
||||
animation/trimming=false
|
||||
animation/remove_immutable_tracks=true
|
||||
animation/import_rest_as_RESET=false
|
||||
import_script/path=""
|
||||
_subresources={
|
||||
"materials": {
|
||||
"Terrain": {
|
||||
"use_external/enabled": true,
|
||||
"use_external/path": "uid://5knww03rsy1a"
|
||||
}
|
||||
}
|
||||
}
|
||||
blender/nodes/visible=0
|
||||
blender/nodes/active_collection_only=false
|
||||
blender/nodes/punctual_lights=true
|
||||
blender/nodes/cameras=true
|
||||
blender/nodes/custom_properties=true
|
||||
blender/nodes/modifiers=1
|
||||
blender/meshes/colors=false
|
||||
blender/meshes/uvs=true
|
||||
blender/meshes/normals=true
|
||||
blender/meshes/export_geometry_nodes_instances=false
|
||||
blender/meshes/tangents=true
|
||||
blender/meshes/skins=2
|
||||
blender/meshes/export_bones_deforming_mesh_only=false
|
||||
blender/materials/unpack_enabled=true
|
||||
blender/materials/export_materials=1
|
||||
blender/animation/limit_playback=true
|
||||
blender/animation/always_sample=true
|
||||
blender/animation/group_tracks=true
|
Binary file not shown.
|
@ -22,9 +22,8 @@ func _process(_delta):
|
|||
"
|
||||
|
||||
[node name="Player" type="PlayerBody"]
|
||||
wall_min_slide_angle = 0.785398
|
||||
floor_max_angle = 0.968658
|
||||
floor_snap_length = 1.5
|
||||
wall_min_slide_angle = 0.0
|
||||
floor_max_angle = 0.523599
|
||||
|
||||
[node name="PlayerStateMachine" type="PlayerStateMachine" parent="."]
|
||||
|
||||
|
|
|
@ -11,7 +11,7 @@ config_version=5
|
|||
[application]
|
||||
|
||||
config/name="going"
|
||||
run/main_scene="uid://sofv1apr4467"
|
||||
run/main_scene="uid://bp0vgy3lnsucd"
|
||||
config/features=PackedStringArray("4.4", "Forward Plus")
|
||||
config/icon="res://icon.svg"
|
||||
|
||||
|
@ -42,11 +42,6 @@ split_step={
|
|||
"events": [Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":-1,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":0,"physical_keycode":32,"key_label":0,"unicode":32,"location":0,"echo":false,"script":null)
|
||||
]
|
||||
}
|
||||
jump={
|
||||
"deadzone": 0.2,
|
||||
"events": [Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":-1,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":0,"physical_keycode":70,"key_label":0,"unicode":102,"location":0,"echo":false,"script":null)
|
||||
]
|
||||
}
|
||||
|
||||
[layer_names]
|
||||
|
||||
|
|
|
@ -79,8 +79,8 @@ transform = Transform3D(0.994166, 0, 0.107861, 0, 1, 0, -0.107861, 0, 0.994166,
|
|||
size = Vector3(33.525, 13.992, 23.5235)
|
||||
|
||||
[node name="CSGBox3D4" type="CSGBox3D" parent="CSGCombiner3D"]
|
||||
transform = Transform3D(-0.994886, 0, -0.101005, 0, 1, 0, 0.101005, 0, -0.994886, -74.3581, 1.78923, -23.1177)
|
||||
size = Vector3(21.0713, 3.2128, 29.5631)
|
||||
transform = Transform3D(-0.994886, 0, -0.101005, 0, 1, 0, 0.101005, 0, -0.994886, -74.3581, 7.17883, -23.1177)
|
||||
size = Vector3(21.0713, 13.992, 29.5631)
|
||||
|
||||
[node name="CSGBox3D17" type="CSGBox3D" parent="CSGCombiner3D"]
|
||||
transform = Transform3D(0.0501054, 0, -0.998744, 0, 1, 0, 0.998744, 0, 0.0501054, -31.5186, 7.17883, -17.6439)
|
||||
|
@ -193,66 +193,6 @@ transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -74.085, 0.5, -77.013)
|
|||
[node name="tree2" parent="." instance=ExtResource("3_j6w7d")]
|
||||
transform = Transform3D(-0.799391, 0, 0.600811, 0, 1, 0, -0.600811, 0, -0.799391, -87.2561, 0.446493, -28.6384)
|
||||
|
||||
[node name="tree8" parent="." instance=ExtResource("3_j6w7d")]
|
||||
transform = Transform3D(-0.799391, 0, 0.600811, 0, 1, 0, -0.600811, 0, -0.799391, -87.1315, 0.446493, -21.9106)
|
||||
|
||||
[node name="tree9" parent="." instance=ExtResource("3_j6w7d")]
|
||||
transform = Transform3D(-0.799391, 0, 0.600811, 0, 1, 0, -0.600811, 0, -0.799391, -86.5709, 0.446493, -14.8713)
|
||||
|
||||
[node name="tree10" parent="." instance=ExtResource("3_j6w7d")]
|
||||
transform = Transform3D(-0.965309, 1.62273e-08, 0.261111, 1.48488e-08, 1, -7.25249e-09, -0.261111, -3.12372e-09, -0.965309, -85.1381, 0.446493, -8.01887)
|
||||
|
||||
[node name="tree11" parent="." instance=ExtResource("3_j6w7d")]
|
||||
transform = Transform3D(-0.475716, 4.32288e-08, -0.879599, 6.47108e-08, 1, 1.41483e-08, 0.879599, -5.01889e-08, -0.475716, -80.2791, 0.446493, -6.71068)
|
||||
|
||||
[node name="tree12" parent="." instance=ExtResource("3_j6w7d")]
|
||||
transform = Transform3D(-0.232156, 4.00848e-08, -0.972679, 6.87794e-08, 1, 2.47947e-08, 0.972679, -6.11441e-08, -0.232156, -73.3021, 0.446493, -7.33363)
|
||||
|
||||
[node name="tree13" parent="." instance=ExtResource("3_j6w7d")]
|
||||
transform = Transform3D(-0.232156, 4.00848e-08, -0.972679, 6.87794e-08, 1, 2.47947e-08, 0.972679, -6.11441e-08, -0.232156, -66.512, 0.446493, -8.08116)
|
||||
|
||||
[node name="tree14" parent="." instance=ExtResource("3_j6w7d")]
|
||||
transform = Transform3D(0.462043, 1.88547e-08, -0.886858, 6.50281e-08, 1, 5.5139e-08, 0.886858, -8.31472e-08, 0.462043, -60.4071, 0.446493, -9.38935)
|
||||
|
||||
[node name="tree15" parent="." instance=ExtResource("3_j6w7d")]
|
||||
transform = Transform3D(0.971301, -3.38198e-08, 0.237855, 1.58653e-08, 1, 7.73994e-08, -0.237855, -7.14045e-08, 0.971301, -60.7186, 0.446493, -14.6844)
|
||||
|
||||
[node name="tree16" parent="." instance=ExtResource("3_j6w7d")]
|
||||
transform = Transform3D(0.975558, -1.7942e-08, -0.219744, 3.58676e-08, 1, 7.75855e-08, 0.219744, -8.35708e-08, 0.975558, -61.7186, 0.446493, -23.6844)
|
||||
|
||||
[node name="tree17" parent="." instance=ExtResource("3_j6w7d")]
|
||||
transform = Transform3D(0.975558, -1.7942e-08, -0.219744, 3.58676e-08, 1, 7.75855e-08, 0.219744, -8.35708e-08, 0.975558, -62.2169, 0.446493, -31.1598)
|
||||
|
||||
[node name="tree19" parent="." instance=ExtResource("3_j6w7d")]
|
||||
transform = Transform3D(0.975558, -1.7942e-08, -0.219744, 3.58676e-08, 1, 7.75855e-08, 0.219744, -8.35708e-08, 0.975558, -68.878, 3.29781, -34.0065)
|
||||
|
||||
[node name="tree20" parent="." instance=ExtResource("3_j6w7d")]
|
||||
transform = Transform3D(0.975558, -1.7942e-08, -0.219744, 3.58676e-08, 1, 7.75855e-08, 0.219744, -8.35708e-08, 0.975558, -67.027, 3.29781, -23.6742)
|
||||
|
||||
[node name="tree21" parent="." instance=ExtResource("3_j6w7d")]
|
||||
transform = Transform3D(0.483466, 1.78905e-08, -0.875364, 6.45256e-08, 1, 5.60754e-08, 0.875364, -8.35939e-08, 0.483466, -65.6471, 3.29781, -14.7554)
|
||||
|
||||
[node name="tree22" parent="." instance=ExtResource("3_j6w7d")]
|
||||
transform = Transform3D(-0.0191803, 3.54398e-08, -0.999816, 6.99656e-08, 1, 3.41041e-08, 0.999816, -6.92986e-08, -0.0191803, -74.1284, 3.29781, -12.5341)
|
||||
|
||||
[node name="tree23" parent="." instance=ExtResource("3_j6w7d")]
|
||||
transform = Transform3D(-0.839155, 4.10431e-08, -0.543892, 5.00365e-08, 1, -1.73813e-09, 0.543892, -2.8673e-08, -0.839155, -82.307, 3.29781, -12.8036)
|
||||
|
||||
[node name="tree24" parent="." instance=ExtResource("3_j6w7d")]
|
||||
transform = Transform3D(-0.982584, 3.22979e-08, -0.185821, 3.43847e-08, 1, -8.00759e-09, 0.185821, -1.42575e-08, -0.982584, -83.0474, 3.29781, -21.0492)
|
||||
|
||||
[node name="tree25" parent="." instance=ExtResource("3_j6w7d")]
|
||||
transform = Transform3D(-0.968449, 1.67255e-08, 0.249214, 1.53688e-08, 1, -7.38972e-09, -0.249214, -3.32642e-09, -0.968449, -83.6196, 3.29781, -29.968)
|
||||
|
||||
[node name="tree26" parent="." instance=ExtResource("3_j6w7d")]
|
||||
transform = Transform3D(0.293357, -4.11094e-08, 0.956003, -1.5526e-08, 1, 4.77655e-08, -0.956003, -2.88552e-08, 0.293357, -83.7206, 3.29781, -35.9251)
|
||||
|
||||
[node name="tree27" parent="." instance=ExtResource("3_j6w7d")]
|
||||
transform = Transform3D(0.293357, -4.11094e-08, 0.956003, -1.5526e-08, 1, 4.77655e-08, -0.956003, -2.88552e-08, 0.293357, -74.4315, 3.29781, -34.9491)
|
||||
|
||||
[node name="tree18" parent="." instance=ExtResource("3_j6w7d")]
|
||||
transform = Transform3D(0.975558, -1.7942e-08, -0.219744, 3.58676e-08, 1, 7.75855e-08, 0.219744, -8.35708e-08, 0.975558, -63.0268, 0.446493, -37.763)
|
||||
|
||||
[node name="tree3" parent="." instance=ExtResource("3_j6w7d")]
|
||||
transform = Transform3D(-0.645085, 0, 0.764112, 0, 1, 0, -0.764112, 0, -0.645085, -87.8342, 0.446493, -33.7517)
|
||||
|
||||
|
|
|
@ -1,24 +0,0 @@
|
|||
[gd_scene load_steps=3 format=3 uid="uid://sofv1apr4467"]
|
||||
|
||||
[ext_resource type="PackedScene" uid="uid://5cfl3xu1861l" path="res://models/terrains/level.blend" id="1_ch7jd"]
|
||||
[ext_resource type="PackedScene" uid="uid://dcgsrdacswacl" path="res://objects/player.tscn" id="2_pvuhy"]
|
||||
|
||||
[node name="Valley" type="Node3D"]
|
||||
|
||||
[node name="level" parent="." instance=ExtResource("1_ch7jd")]
|
||||
|
||||
[node name="Player" parent="." instance=ExtResource("2_pvuhy")]
|
||||
transform = Transform3D(-4.37114e-08, 0, 1, 0, 1, 0, -1, 0, -4.37114e-08, 523.554, 26.0153, -0.09375)
|
||||
|
||||
[node name="DirectionalLight3D" type="DirectionalLight3D" parent="."]
|
||||
transform = Transform3D(1, 0, 0, 0, -0.740828, 0.671695, 0, -0.671695, -0.740828, 0, 6.05439, 0)
|
||||
shadow_enabled = true
|
||||
shadow_normal_bias = 9.168
|
||||
shadow_reverse_cull_face = true
|
||||
shadow_blur = 0.973
|
||||
directional_shadow_split_1 = 0.009
|
||||
directional_shadow_split_2 = 0.173
|
||||
directional_shadow_split_3 = 0.73
|
||||
directional_shadow_fade_start = 0.712
|
||||
directional_shadow_max_distance = 1010.0
|
||||
directional_shadow_pancake_size = 1.7
|
Loading…
Reference in a new issue