mirror of
https://github.com/APercy/automobiles_pck
synced 2025-09-14 07:36:24 +02:00
collision on rear axis fixed
This commit is contained in:
parent
04e27cd042
commit
fe2ddb7880
@ -21,7 +21,7 @@ function automobiles.ground_get_distances(self, radius, axis_distance)
|
||||
local rear_obstacle_level = automobiles.get_obstacle(rear_axis)
|
||||
|
||||
local f_x, f_z = automobiles.get_xz_from_hipotenuse(pos.x, pos.z, yaw, hip)
|
||||
--local x, f_y = automobiles.get_xz_from_hipotenuse(f_x, r_y, pitch - math.rad(90), hip) --the x is only a mock
|
||||
local x, f_y = automobiles.get_xz_from_hipotenuse(f_x, r_y, pitch - math.rad(90), hip) --the x is only a mock
|
||||
--minetest.chat_send_all("r: "..r_y.." f: "..f_y .." - "..math.deg(pitch))
|
||||
local front_axis = {x=f_x, y=r_y, z=f_z}
|
||||
local front_obstacle_level = automobiles.get_obstacle(front_axis)
|
||||
|
@ -26,8 +26,8 @@ initial_properties = {
|
||||
|
||||
minetest.register_entity('automobiles_roadster:rear_suspension',{
|
||||
initial_properties = {
|
||||
physical = false,
|
||||
collide_with_objects=false,
|
||||
physical = true,
|
||||
collide_with_objects=true,
|
||||
pointable=false,
|
||||
visual = "mesh",
|
||||
mesh = "automobiles_roadster_rear_suspension.b3d",
|
||||
@ -163,7 +163,7 @@ minetest.register_entity("automobiles_roadster:roadster", {
|
||||
initial_properties = {
|
||||
physical = true,
|
||||
collide_with_objects = true,
|
||||
collisionbox = {-0.5, -0.5, -0.5, 0.5, 1, 0.5},
|
||||
collisionbox = {-0.1, -0.5, -0.1, 0.1, 1, 0.1},
|
||||
selectionbox = {-1.5, 0.0, -1.5, 1.5, 2, 1.5},
|
||||
stepheight = 0.5,
|
||||
visual = "mesh",
|
||||
|
Loading…
Reference in New Issue
Block a user