Hi,
I'm building a thing where I'm using the great lerp camera by kidscancode. I thought I'd use the same camera for different objects.
I'm trying to create "an entering a vehicle" mechanic where when the player presses the action button the camera switches over to the vehicle and the control set for that vehicle is activated at the same time deactivating the player objects control.
I have figured out switching the camera is a rudimentory way:
func get_input():
if Input.is_action_pressed("action_A"):
target_path = get_node("/root/World/PolyPlane")
target = target_path
I would now like to set the input for PolyPlayer inactive and Polyplane active. Since this is the camera's script, I am unable to get and set the script variables I've created for the PolyPlane and PolyPlayer which I want to toggle.
Also, I want the camera to read and set the offset variables from those two objects (Which I will set individually in their scripts) when switched so this is also something I hope can be accomplished in some similar way.


