Gamestudio Links
Zorro Links
Newest Posts
loading historical data 1st time
by AndrewAMD. 04/14/23 12:54
Trade at bar open
by juanex. 04/13/23 19:43
Bug in Highpass2 filter
by rki. 04/13/23 09:54
Adding Limit Orders For IB
by scatters. 04/11/23 16:16
FisherN
by rki. 04/11/23 08:38
AUM Magazine
Latest Screens
SHADOW (2014)
DEAD TASTE
Tactics of World War I
Hecknex World
Who's Online Now
2 registered members (Grant, AndrewAMD), 911 guests, and 9 spiders.
Key: Admin, Global Mod, Mod
Newest Members
rki, FranzIII, indonesiae, The_Judge, storrealba
18919 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Sample code for how to use models as waypoints? #239193
12/03/08 06:01
12/03/08 06:01
Joined: Sep 2006
Posts: 36
Tempe, AZ
B
bpc31 Offline OP
Newbie
bpc31  Offline OP
Newbie
B

Joined: Sep 2006
Posts: 36
Tempe, AZ
For example if I wanted cars to race around an oval track using cones as the waypoints but each car would stay a different distance (generated randomly) to the right of each cone assuming they are racing counter-clockwise.

Thanks!

Re: Sample code for how to use models as waypoints? [Re: bpc31] #240133
12/09/08 16:32
12/09/08 16:32
Joined: Aug 2002
Posts: 3,258
Mainz
oliver2s Offline
Expert
oliver2s  Offline
Expert

Joined: Aug 2002
Posts: 3,258
Mainz
Code:
vec_add(car.x, temp); //set car position to cone position

temp.x = random(100)-50; //create random dist from -50 to 50
temp.y = 0; temp.z = 0;

vec_rotate(temp, cone.pan); //rotate vector
vec_set(car.x, cone.x); //add the random side dist to the car


Re: Sample code for how to use models as waypoints? [Re: oliver2s] #241919
12/20/08 01:00
12/20/08 01:00
Joined: Aug 2002
Posts: 2,183
Germany, BaW�
Rondidon Offline
Expert
Rondidon  Offline
Expert

Joined: Aug 2002
Posts: 2,183
Germany, BaW�
Have a look at this (very good) open source pathfinding engine: Intense Pathfinding 2 from the creators of Intense X: www.intense-i.com
They also use models as waypoints.


Moderated by  HeelX, Spirit 

Gamestudio download | chip programmers | Zorro platform | shop | Data Protection Policy

oP group Germany GmbH | Birkenstr. 25-27 | 63549 Ronneburg / Germany | info (at) opgroup.de

Powered by UBB.threads™ PHP Forum Software 7.7.1