Gamestudio Links
Zorro Links
Newest Posts
zorro with ccxt?
by opm. 03/03/26 03:17
ZorroGPT
by TipmyPip. 03/02/26 18:13
WFO Training with parallel cores Zorro64
by Martin_HH. 02/26/26 16:03
Zorro version 3.0 prerelease!
by TipmyPip. 02/25/26 16:38
Camera always moves upwards?
by clonman. 02/21/26 09:29
AUM Magazine
Latest Screens
Dorifto samurai
Shadow 2
Rocker`s Revenge
Stug 3 Stormartillery
Who's Online Now
3 registered members (TipmyPip, AndrewAMD, Quad), 5,062 guests, and 2 spiders.
Key: Admin, Global Mod, Mod
Newest Members
the1, alx, ApprenticeInMuc, PatrickH90, USER0328
19200 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 | 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