I am getting the following error:
Invalid call to function 'new' in base 'GDNativeClass'. Expected 0 arguments.
With the following code:
extends RayCast
const ray_length = 1000
func _input(ev):
if ev.type==InputEvent.MOUSE_BUTTON and ev.pressed and ev.button_index==1:
var camera = get_node("Camera")
var from = camera.project_ray_origin(ev.pos)
var to = from + camera.project_ray_normal(ev.pos) * ray_length
func _fixed_process(delta):
var space_state = get_world().get_direct_space_state()
use global coordinates, not local to node
var col = get_collision_point()
var put = TestCube.new()
var idc = get_node(Position3D.new(set_name('ThisSpot')))
var result = space_state.intersect_ray( Vector3(0,0,0), Vector3(50,100,100) )
if (not result.empty()):
load('res://Meshes/mvp_room_atmpt3.msh')
idc.set_translation(col)
(it says the error is on line 16)