Use proper real world scale for the car
This commit is contained in:
parent
78ab4eeae9
commit
c3945a80e5
@ -1,31 +1,31 @@
|
|||||||
# Blender 4.3.2
|
# Blender 4.4.0
|
||||||
# www.blender.org
|
# www.blender.org
|
||||||
o Object_5
|
o Object_5
|
||||||
v -1.859343 0.407766 2.882677
|
v -0.809354 0.177497 1.254802
|
||||||
v -1.496358 -0.439898 4.246497
|
v -0.651350 -0.191484 1.848460
|
||||||
v -1.532271 -0.014560 4.306011
|
v -0.666983 -0.006338 1.874366
|
||||||
v -1.458925 0.588598 4.098169
|
v -0.635056 0.256211 1.783894
|
||||||
v -1.169193 1.844997 -0.020979
|
v -0.508939 0.803110 -0.009132
|
||||||
v -1.767808 0.808841 -2.967643
|
v -0.769510 0.352081 -1.291787
|
||||||
v -1.755688 0.019238 -3.954955
|
v -0.764234 0.008374 -1.721554
|
||||||
v 1.566465 -0.437912 4.228478
|
v 0.681867 -0.190619 1.840616
|
||||||
v -1.355442 0.201413 4.442485
|
v -0.590011 0.087673 1.933771
|
||||||
v -1.527377 -0.513372 -3.070427
|
v -0.664853 -0.223466 -1.336528
|
||||||
v -1.081991 -0.669592 2.507292
|
v -0.470980 -0.291467 1.091400
|
||||||
v 1.152275 -0.667651 2.498548
|
v 0.501574 -0.290622 1.087594
|
||||||
v -1.177522 1.915790 -2.273865
|
v -0.512564 0.833925 -0.989792
|
||||||
v -1.440784 1.165512 -4.710642
|
v -0.627160 0.507336 -2.050498
|
||||||
v -1.567565 0.052245 -5.155589
|
v -0.682346 0.022742 -2.244179
|
||||||
v 1.558806 0.207560 4.426651
|
v 0.678533 0.090349 1.926879
|
||||||
v 1.597780 -0.511147 -3.072741
|
v 0.695498 -0.222497 -1.337535
|
||||||
v 1.825968 0.019292 -3.954931
|
v 0.794826 0.008397 -1.721544
|
||||||
v 1.929686 0.407656 2.882679
|
v 0.839974 0.177449 1.254803
|
||||||
v 1.529256 0.593033 4.083607
|
v 0.665671 0.258142 1.777555
|
||||||
v 1.239481 1.844996 -0.020995
|
v 0.539534 0.803109 -0.009139
|
||||||
v 1.247809 1.915789 -2.273863
|
v 0.543159 0.833925 -0.989791
|
||||||
v 1.511068 1.165512 -4.710640
|
v 0.657754 0.507336 -2.050497
|
||||||
v 1.637697 0.053622 -5.155048
|
v 0.712874 0.023341 -2.243943
|
||||||
v 1.838094 0.808837 -2.967645
|
v 0.800105 0.352079 -1.291788
|
||||||
s 0
|
s 0
|
||||||
f 1 2 3
|
f 1 2 3
|
||||||
f 1 3 4
|
f 1 3 4
|
||||||
|
BIN
assets/toyota_corolla_ae86_trueno.glb
(Stored with Git LFS)
BIN
assets/toyota_corolla_ae86_trueno.glb
(Stored with Git LFS)
Binary file not shown.
@ -322,23 +322,23 @@ update_runtime_world :: proc(runtime_world: ^Runtime_World, dt: f32) {
|
|||||||
|
|
||||||
sim_state := physics.get_sim_state(&world.physics_scene)
|
sim_state := physics.get_sim_state(&world.physics_scene)
|
||||||
|
|
||||||
// 1.6 is a good value
|
wheel_extent_x_front := f32(1.355) / 2
|
||||||
wheel_extent_x := f32(1.7)
|
wheel_extent_x_back := f32(1.345) / 2
|
||||||
wheel_y := f32(-0.5)
|
wheel_y := f32(-0.1)
|
||||||
rest := f32(1)
|
rest := f32(1)
|
||||||
natural_frequency := f32(0.35)
|
natural_frequency := f32(0.35)
|
||||||
damping := f32(0.07)
|
damping := f32(0.07)
|
||||||
radius := f32(0.6)
|
radius := f32(0.2888)
|
||||||
wheel_front_z := f32(3.05)
|
wheel_front_z := f32(1.3)
|
||||||
wheel_back_z := f32(-2.45)
|
wheel_back_z := f32(-1.1)
|
||||||
wheel_mass := f32(12)
|
wheel_mass := f32(30)
|
||||||
|
|
||||||
wheel_fl := physics.immediate_suspension_constraint(
|
wheel_fl := physics.immediate_suspension_constraint(
|
||||||
&world.physics_scene,
|
&world.physics_scene,
|
||||||
&runtime_world.solver_state,
|
&runtime_world.solver_state,
|
||||||
#hash("FL", "fnv32a"),
|
#hash("FL", "fnv32a"),
|
||||||
{
|
{
|
||||||
rel_pos = {-wheel_extent_x, wheel_y, wheel_front_z},
|
rel_pos = {-wheel_extent_x_front, wheel_y, wheel_front_z},
|
||||||
rel_dir = {0, -1, 0},
|
rel_dir = {0, -1, 0},
|
||||||
radius = radius,
|
radius = radius,
|
||||||
rest = rest,
|
rest = rest,
|
||||||
@ -353,7 +353,7 @@ update_runtime_world :: proc(runtime_world: ^Runtime_World, dt: f32) {
|
|||||||
&runtime_world.solver_state,
|
&runtime_world.solver_state,
|
||||||
#hash("FR", "fnv32a"),
|
#hash("FR", "fnv32a"),
|
||||||
{
|
{
|
||||||
rel_pos = {wheel_extent_x, wheel_y, wheel_front_z},
|
rel_pos = {wheel_extent_x_front, wheel_y, wheel_front_z},
|
||||||
rel_dir = {0, -1, 0},
|
rel_dir = {0, -1, 0},
|
||||||
radius = radius,
|
radius = radius,
|
||||||
rest = rest,
|
rest = rest,
|
||||||
@ -368,7 +368,7 @@ update_runtime_world :: proc(runtime_world: ^Runtime_World, dt: f32) {
|
|||||||
&runtime_world.solver_state,
|
&runtime_world.solver_state,
|
||||||
#hash("RL", "fnv32a"),
|
#hash("RL", "fnv32a"),
|
||||||
{
|
{
|
||||||
rel_pos = {-wheel_extent_x, wheel_y, wheel_back_z},
|
rel_pos = {-wheel_extent_x_back, wheel_y, wheel_back_z},
|
||||||
rel_dir = {0, -1, 0},
|
rel_dir = {0, -1, 0},
|
||||||
radius = radius,
|
radius = radius,
|
||||||
rest = rest,
|
rest = rest,
|
||||||
@ -383,7 +383,7 @@ update_runtime_world :: proc(runtime_world: ^Runtime_World, dt: f32) {
|
|||||||
&runtime_world.solver_state,
|
&runtime_world.solver_state,
|
||||||
#hash("RR", "fnv32a"),
|
#hash("RR", "fnv32a"),
|
||||||
{
|
{
|
||||||
rel_pos = {wheel_extent_x, wheel_y, wheel_back_z},
|
rel_pos = {wheel_extent_x_back, wheel_y, wheel_back_z},
|
||||||
rel_dir = {0, -1, 0},
|
rel_dir = {0, -1, 0},
|
||||||
radius = radius,
|
radius = radius,
|
||||||
rest = rest,
|
rest = rest,
|
||||||
@ -1093,7 +1093,7 @@ game_memory_size :: proc() -> int {
|
|||||||
game_hot_reloaded :: proc(mem: rawptr) {
|
game_hot_reloaded :: proc(mem: rawptr) {
|
||||||
g_mem = (^Game_Memory)(mem)
|
g_mem = (^Game_Memory)(mem)
|
||||||
|
|
||||||
g_mem.runtime_world.orbit_camera.distance = 10
|
g_mem.runtime_world.orbit_camera.distance = 4
|
||||||
}
|
}
|
||||||
|
|
||||||
@(export)
|
@(export)
|
||||||
|
@ -514,7 +514,7 @@ pgs_solve_engines :: proc(sim_state: ^Sim_State, config: Solver_Config, dt: f32,
|
|||||||
|
|
||||||
friction :=
|
friction :=
|
||||||
math.pow(
|
math.pow(
|
||||||
max(engine.w - rpm_to_angular_velocity(engine.lowest_rpm), 0) * 0.001,
|
max(engine.w - rpm_to_angular_velocity(engine.lowest_rpm), 0) * 0.002,
|
||||||
4,
|
4,
|
||||||
) *
|
) *
|
||||||
engine.internal_friction +
|
engine.internal_friction +
|
||||||
|
BIN
src_assets/ae86.blend
(Stored with Git LFS)
Normal file
BIN
src_assets/ae86.blend
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
src_assets/ae86.blend1
(Stored with Git LFS)
Normal file
BIN
src_assets/ae86.blend1
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
src_assets/car_convex.blend
(Stored with Git LFS)
BIN
src_assets/car_convex.blend
(Stored with Git LFS)
Binary file not shown.
BIN
src_assets/car_convex.blend1
(Stored with Git LFS)
BIN
src_assets/car_convex.blend1
(Stored with Git LFS)
Binary file not shown.
Loading…
x
Reference in New Issue
Block a user