Gamestudio Links
Zorro Links
Newest Posts
ZorroGPT
by TipmyPip. 02/21/26 19:15
Camera always moves upwards?
by clonman. 02/21/26 09:29
Zorro version 3.0 prerelease!
by TipmyPip. 02/20/26 13:22
Sam Foster Sound | Experienced Game Composer for Hire
by titanicpiano14. 02/19/26 13:22
AUM Magazine
Latest Screens
Dorifto samurai
Shadow 2
Rocker`s Revenge
Stug 3 Stormartillery
Who's Online Now
2 registered members (USER0328, 1 invisible), 6,537 guests, and 2 spiders.
Key: Admin, Global Mod, Mod
Newest Members
alx, ApprenticeInMuc, PatrickH90, USER0328, Sfrdragon
19199 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Page 2 of 2 1 2
Re: car AI path question [Re: Xarthor] #83725
07/31/06 01:39
07/31/06 01:39
Joined: Jun 2006
Posts: 86
Asia
xboy360 Offline OP
Junior Member
xboy360  Offline OP
Junior Member

Joined: Jun 2006
Posts: 86
Asia
Wow..wow..i'll try the code, tnx again alll! yaaayy yaaaayy yaaayy 8)


Happy Birthday!
Re: car AI path question [Re: xboy360] #83726
07/31/06 06:18
07/31/06 06:18
Joined: Jun 2006
Posts: 86
Asia
xboy360 Offline OP
Junior Member
xboy360  Offline OP
Junior Member

Joined: Jun 2006
Posts: 86
Asia
Ok it works! Yahoo!

But...(not again )..

since this is my 1st time to use trace, i dont know what vectors to input so it traces from its front.

I put:
action car
{
while(1)
{
vec_set(myfront,my.pos);
myfront.x += 10;
trace(my.pos,myfront);
etc...........................

I know x is front. But when i run, it doesn't change when the car is turning.
it uses the world position 'x', not local position 'x'. Oh no! what do i do?
Forgive me for being a bad programmer.


Happy Birthday!
Re: car AI path question [Re: xboy360] #83727
07/31/06 10:39
07/31/06 10:39
Joined: Jul 2002
Posts: 4,436
Germany, Luebeck
Xarthor Offline
Expert
Xarthor  Offline
Expert

Joined: Jul 2002
Posts: 4,436
Germany, Luebeck
Code:

action car
{
while(1)
{
vec_for_angle(myfront,vector(my.pan,my.tilt,0));
vec_normalize(myfront,10);
vec_add(myfront,my.x);
trace_mode = //insert trace mode here
trace(my.x,myfront);
//and so on
}
}



Page 2 of 2 1 2

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