summaryrefslogtreecommitdiff
path: root/scene/3d/vehicle_body_3d.h
diff options
context:
space:
mode:
Diffstat (limited to 'scene/3d/vehicle_body_3d.h')
-rw-r--r--scene/3d/vehicle_body_3d.h9
1 files changed, 6 insertions, 3 deletions
diff --git a/scene/3d/vehicle_body_3d.h b/scene/3d/vehicle_body_3d.h
index 2c10205ea3..eb6923df54 100644
--- a/scene/3d/vehicle_body_3d.h
+++ b/scene/3d/vehicle_body_3d.h
@@ -129,6 +129,8 @@ public:
bool is_in_contact() const;
+ Node3D *get_contact_body() const;
+
void set_roll_influence(real_t p_value);
real_t get_roll_influence() const;
@@ -150,8 +152,8 @@ public:
VehicleWheel3D();
};
-class VehicleBody3D : public RigidBody3D {
- GDCLASS(VehicleBody3D, RigidBody3D);
+class VehicleBody3D : public RigidDynamicBody3D {
+ GDCLASS(VehicleBody3D, RigidDynamicBody3D);
real_t engine_force = 0.0;
real_t brake = 0.0;
@@ -192,7 +194,8 @@ class VehicleBody3D : public RigidBody3D {
static void _bind_methods();
- void _direct_state_changed(Object *p_state) override;
+ static void _body_state_changed_callback(void *p_instance, PhysicsDirectBodyState3D *p_state);
+ virtual void _body_state_changed(PhysicsDirectBodyState3D *p_state) override;
public:
void set_engine_force(real_t p_engine_force);