@@ -392,7 +392,7 @@ TEST_SUITE("[Navigation2D]") {
392
392
CHECK_EQ (agent_avoidance_callback_mock.function1_calls , 0 );
393
393
navigation_server->physics_process (0.0 ); // Give server some cycles to commit.
394
394
CHECK_EQ (agent_avoidance_callback_mock.function1_calls , 1 );
395
- CHECK_NE (agent_avoidance_callback_mock.function1_latest_arg0 , Vector3 ( 0 , 0 , 0 ));
395
+ CHECK_NE (agent_avoidance_callback_mock.function1_latest_arg0 , Vector2 ( 0 , 0 ));
396
396
397
397
navigation_server->free (agent);
398
398
navigation_server->free (map);
@@ -429,12 +429,12 @@ TEST_SUITE("[Navigation2D]") {
429
429
navigation_server->physics_process (0.0 ); // Give server some cycles to commit.
430
430
CHECK_EQ (agent_1_avoidance_callback_mock.function1_calls , 1 );
431
431
CHECK_EQ (agent_2_avoidance_callback_mock.function1_calls , 1 );
432
- Vector3 agent_1_safe_velocity = agent_1_avoidance_callback_mock.function1_latest_arg0 ;
433
- Vector3 agent_2_safe_velocity = agent_2_avoidance_callback_mock.function1_latest_arg0 ;
432
+ Vector2 agent_1_safe_velocity = agent_1_avoidance_callback_mock.function1_latest_arg0 ;
433
+ Vector2 agent_2_safe_velocity = agent_2_avoidance_callback_mock.function1_latest_arg0 ;
434
434
CHECK_MESSAGE (agent_1_safe_velocity.x > 0 , " agent 1 should move a bit along desired velocity (+X)" );
435
435
CHECK_MESSAGE (agent_2_safe_velocity.x < 0 , " agent 2 should move a bit along desired velocity (-X)" );
436
- CHECK_MESSAGE (agent_1_safe_velocity.z < 0 , " agent 1 should move a bit to the side so that it avoids agent 2" );
437
- CHECK_MESSAGE (agent_2_safe_velocity.z > 0 , " agent 2 should move a bit to the side so that it avoids agent 1" );
436
+ CHECK_MESSAGE (agent_1_safe_velocity.y < 0 , " agent 1 should move a bit to the side so that it avoids agent 2" );
437
+ CHECK_MESSAGE (agent_2_safe_velocity.y > 0 , " agent 2 should move a bit to the side so that it avoids agent 1" );
438
438
439
439
navigation_server->free (agent_2);
440
440
navigation_server->free (agent_1);
@@ -466,9 +466,9 @@ TEST_SUITE("[Navigation2D]") {
466
466
CHECK_EQ (agent_1_avoidance_callback_mock.function1_calls , 0 );
467
467
navigation_server->physics_process (0.0 ); // Give server some cycles to commit.
468
468
CHECK_EQ (agent_1_avoidance_callback_mock.function1_calls , 1 );
469
- Vector3 agent_1_safe_velocity = agent_1_avoidance_callback_mock.function1_latest_arg0 ;
469
+ Vector2 agent_1_safe_velocity = agent_1_avoidance_callback_mock.function1_latest_arg0 ;
470
470
CHECK_MESSAGE (agent_1_safe_velocity.x > 0 , " Agent 1 should move a bit along desired velocity (+X)." );
471
- CHECK_MESSAGE (agent_1_safe_velocity.z < 0 , " Agent 1 should move a bit to the side so that it avoids obstacle." );
471
+ CHECK_MESSAGE (agent_1_safe_velocity.y < 0 , " Agent 1 should move a bit to the side so that it avoids obstacle." );
472
472
473
473
navigation_server->free (obstacle_1);
474
474
navigation_server->free (agent_1);
@@ -518,12 +518,12 @@ TEST_SUITE("[Navigation2D]") {
518
518
navigation_server->physics_process (0.0 ); // Give server some cycles to commit.
519
519
CHECK_EQ (agent_1_avoidance_callback_mock.function1_calls , 1 );
520
520
CHECK_EQ (agent_2_avoidance_callback_mock.function1_calls , 1 );
521
- Vector3 agent_1_safe_velocity = agent_1_avoidance_callback_mock.function1_latest_arg0 ;
522
- Vector3 agent_2_safe_velocity = agent_2_avoidance_callback_mock.function1_latest_arg0 ;
521
+ Vector2 agent_1_safe_velocity = agent_1_avoidance_callback_mock.function1_latest_arg0 ;
522
+ Vector2 agent_2_safe_velocity = agent_2_avoidance_callback_mock.function1_latest_arg0 ;
523
523
CHECK_MESSAGE (agent_1_safe_velocity.x > 0 , " Agent 1 should move a bit along desired velocity (+X)." );
524
- CHECK_MESSAGE (agent_1_safe_velocity.z < 0 , " Agent 1 should move a bit to the side so that it avoids obstacle." );
524
+ CHECK_MESSAGE (agent_1_safe_velocity.y < 0 , " Agent 1 should move a bit to the side so that it avoids obstacle." );
525
525
CHECK_MESSAGE (agent_2_safe_velocity.x > 0 , " Agent 2 should move a bit along desired velocity (+X)." );
526
- CHECK_MESSAGE (agent_2_safe_velocity.z == 0 , " Agent 2 should not move to the side." );
526
+ CHECK_MESSAGE (agent_2_safe_velocity.y == 0 , " Agent 2 should not move to the side." );
527
527
528
528
navigation_server->free (obstacle_1);
529
529
navigation_server->free (agent_2);
0 commit comments