what is the extent function fror object3d

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

extends RigidBody3D

var size = Vector3()

func create_room(apos, asize):
position = apos
size = asize
var s = BoxMesh.new()
s.extents = Vector3(size)
$CollisionShape3D.shape = s

Invalid set index ‘extents’ (on base: ‘BoxMesh’) with value of type ‘Vector3’.

what is the function so i can change the shape of the object 3d in the script, im using newest version of godot

:bust_in_silhouette: Reply From: jgodfrey

As documented, the BoxMesh object has a size property. So, something like:

s.size = <some_vector3>