Gamestudio Links
Zorro Links
Newest Posts
Purchase A8 full licence version
by ukgamer. 09/28/26 10:17
A3 projects
by rayp. 09/27/26 20:38
Parent/child object
by rayp. 09/27/26 14:43
Bug in train mode, or it seem to me
by mistery. 09/24/26 17:34
AUM Magazine
Latest Screens
Dorifto samurai
Shadow 2
Rocker`s Revenge
Stug 3 Stormartillery
Who's Online Now
0 registered members (), 3,505 guests, and 1 spider.
Key: Admin, Global Mod, Mod
Newest Members
KelleyAbbey, Yopachi, Knull, Opus, Jubilee
19242 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