Godot Version
4.2
Question
How do i get my nav agent 3d to pick arabdon spot on the map, i think its a 4.3 feature but idk, also i cant get 4.3 bcs of my dads bad pc
(from what i remember my dads pc cant run opengl 3.3)
Also sorry for no code my script is prob 50% only that
Thanks in advance
So Project got a bit upgraded to see how it will perform with multiple Agent’s
current code
extends CharacterBody3D
@onready var navigation_agent_3d: NavigationAgent3D = $NavigationAgent3D
func _unhandled_input(event: InputEvent) -> void:
if event.is_action_pressed("ui_accept"):
var random_position = Vector3.ZERO
random_position.x = randf_range(-15.0, 15.0)
random_position.z = randf_range(-5.0, 35.0)
navigation_agent_3d.set_target_position(random_position)
func _physics_process(d…
I’m still working on basics but it’s working and can be tested.
Sorry for the late reply, does it check if its a “valid spot” like in the nav mesh or does it go over the nave mesh (sorry if the reply is late)
@onready var nav_region: NavigationRegion3D = $NavigationRegion3D
var random_point_3d: Vector3 = NavigationServer3D.region_get_random_point(nav_region.get_rid(), 1, false)
If you can just use a navigation region.