Gamestudio Links
Zorro Links
Newest Posts
Newbie Questions
by AndrewAMD. 12/05/23 10:56
Zorro Trader GPT
by TipmyPip. 12/04/23 11:34
Square root rule
by Smallz. 12/02/23 09:15
RTest not found error
by TipmyPip. 12/01/23 21:43
neural function for Python to [Train]
by TipmyPip. 12/01/23 14:47
Xor Memory Problem.
by TipmyPip. 11/28/23 14:23
Training with command line parameters
by TipmyPip. 11/26/23 08:42
Combine USD & BTC Pairs In Asset Loop
by TipmyPip. 11/26/23 08:30
AUM Magazine
Latest Screens
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Tactics of World War I
Who's Online Now
6 registered members (3run, AndrewAMD, alibaba, fairtrader, ozgur, TipmyPip), 605 guests, and 0 spiders.
Key: Admin, Global Mod, Mod
Newest Members
fairtrader, hus, Vurtis, Harry5, KelvinC
19019 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