Upgrade to 3.1 break my game.

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By Paul WOISARD

Hello,

I would like use in func _physics_process(delta):

var bodiesHit = get_colliding_bodies()

So i used in func _ready():

set_max_contacts_reported(5)

In Godot 3.0 I haven’t any problem.
Now in Godot 3.0 I have a mistake :

Method 'set_max_contacts_reported' is not declared in the current class.

How to solved this ? please ?

To what node type this script is attached?

What type to you state in the “extends” line of your script?

Should be RigidBody or RigidBody2D.

Alternatively you could use: contacts_reported = 5.

wombatstampede | 2019-03-16 14:39

:bust_in_silhouette: Reply From: Paul WOISARD

I solved the problem :

I just changed :

extends spatial

to

extends VehicleBody