Questions tagged [waypoints]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
0 votes
0 answers
21 views

Why is my NavMeshAgent Waypoint system not looping

I have a character moving along 5 waypoints and it should be looping, but for some reason the Update method stops after the character reaches the last waypoint. The output for currWaypoint is 0, 1, 2, ...
Audrey Chung's user avatar
0 votes
1 answer
593 views

How to move a character gradually over a list of waypoints?

I have a list whose elements are Vector2 points in world space: (9, -9) (9, -13) (5, -13) What I want is that my enemy character should first go to (9, -9) ...
gunza's user avatar
  • 13
1 vote
1 answer
369 views

Sprite won't flip properly

I have a waypoint script I use to control enemy patrol movement in a given area. I use a reference to the Sprite Renderer to change the sprite facing direction. It starts with flipX set to false, by ...
TBG's user avatar
  • 25
0 votes
1 answer
75 views

How can I create this navigation system?

I try to make a navigation/waypoint system. Well I have a concept but no idea how I could create this system. Well here's an image and an explanation: You can see 3 waypoints as well as an goal and ...
Leocat's user avatar
  • 49
0 votes
1 answer
2k views

simple 2d car AI unity

I have a top down Car Game. how can I implement AI for the Cars? how the car follow the way points? I want AI cars also rotate itself along the path. I tried this solution ...
Sh.Adel's user avatar
  • 191
0 votes
0 answers
250 views

Variable Car Simulation using Waypoints

I have a single lane road and I want cars to drive along it. I want variables such as car speed and gap lengths between cars to be changeable. I have already implemented this simply using a Waypoint ...
rafvasq's user avatar
  • 123
0 votes
1 answer
205 views

How can I add up the Transform/GameObjects in the Array of Waypoints in Unity?

I come up with this code and I try to get the waypoint + 1 when I reach the waypoint and it adds up till the last waypoint. I get Array is out of Index error. I guess I need and foreach loop of ...
Daniel's user avatar
  • 141
1 vote
1 answer
215 views

How do I simplify this code with an Array and counting int up in Unity?

I want to simplify my code. I had the idea of making an Array of waypoints[] and and int i to count up each time I arrive a new point of waypoint but it should be the same way my code is but instead ...
Daniel's user avatar
  • 141
1 vote
2 answers
4k views

How to move a player along Waypoints with Rigidbody.MovePosition in Unity?

I have a player with a Rigidbody, I want it to follow along the Waypoints. I have used MoveTowards but it seems also not to work however. I want to use MovePosition to add force while grinding. I ...
Daniel's user avatar
  • 141
0 votes
1 answer
363 views

Unity, Player isnt following along the waypoints

I have a player with a Rigidbody, I want it to follow along the Waypoints, I have a script for it I tested it first on a Cube, everything worked fine, but on my character it just moves Towards the ...
Daniel's user avatar
  • 141
2 votes
2 answers
484 views

How can I move a 3d object to a known Cartesian point on the surface of a sphere?

I'm trying to figure out how to move an object from one Cartesian point to another located on the surface of a 3D sphere. So that the object will follow the spherical coordinate system (Theta and Phi) ...
J. Dove's user avatar
  • 105
4 votes
1 answer
18k views

ScriptableObject referencing a gameobject in scene

What I'm using for the scriptableobjects that requires a reference of a gameobject in scene is for scheduling events like for moving. Meaning a scriptableobjects should have a gameobject or waypoint ...
javurtez's user avatar
0 votes
1 answer
95 views

Following waypoints, condition is never fulfilled

Given a 2D-grid which is defined like below and is used to draw a grid consisting of cells: int[,] grid; //filled with 0 (blocked) and 1 (walkable); I also have ...
チーズパン's user avatar
0 votes
1 answer
51 views

Filling a 2D polygone with N points more or less equally distanced

Following challenge: having any number of connected 2D faces forming virtually a polygone and filling the polygone with a variable number of points equally distanced to each other. So here is a ...
Markus Siebeneicher's user avatar
4 votes
4 answers
3k views

How do I make a racing car turn more smoothly when traversing waypoints?

In a racing game, I have set up waypoints for the player to follow. I have added many waypoints to give an illusion of curved movement. However, the player car turns instantaneously when passing ...
idurvesh's user avatar
  • 530