Questions tagged [waypoints]

The tag has no usage guidance.

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

Unity Waypoint system

I am trying to code a way to choose between multiple paths using the waypoint system. I tried it with if statements but it was just very inefficient. Can anyone suggest me some ways to get this done? ...
0
votes
1answer
332 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 ...
0
votes
0answers
147 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 ...
0
votes
1answer
105 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 ...
1
vote
1answer
80 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 ...
1
vote
2answers
1k 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 ...
0
votes
1answer
148 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 ...
2
votes
2answers
69 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) ...
1
vote
1answer
4k 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 ...
0
votes
1answer
66 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 ...
0
votes
1answer
42 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 ...
4
votes
4answers
2k 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 ...