Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Newcomers DBPro Corner / need help with my code

Author
Message
Turoid
20
Years of Service
User Offline
Joined: 1st Nov 2003
Location: The Netherlands
Posted: 22nd Jan 2004 21:46
here is the code:



i want to make a racing game, object nr 10 is the car and it must rotates just as the matrix is, but it doesn't. could somebody help me?

thanks in advance

sorry for my bad english

if I = 1 then I = 1 else I = 0
Turoid
20
Years of Service
User Offline
Joined: 1st Nov 2003
Location: The Netherlands
Posted: 23rd Jan 2004 18:22
can no one help me?

if I = 1 then I = 1 else I = 0
Xander
21
Years of Service
User Offline
Joined: 3rd Mar 2003
Location: In college...yeah!
Posted: 24th Jan 2004 07:19
I'll try to help you.

Okay, I looked at your code, and this is what I got from it:
-You are trying to find the four corners of the car, and rotate it so that it moves smoothly along the matrix, right?

A perfect example of this can be found in the Tank program, found in the Dark Basic "myproj" folder. This is the method that it uses, you should be able to get it from there. I am not sure why you used these commands:

xang#=atanfull(20,difr#)
zang#=atanfull(20,difr#)

I know that atanfull finds an angle, and I think that 20 would be the length of your car, and difr# is the posy3#-posy4# or posy1#-posy2#, but I don't think that that would quite work...

If you know how, you should use trigonemtry instead (sin, cos, tan). It is much better. If you don't know how, I could help you.

Again, just check out the tank demo and see if it helps.

Good Luck

Xander Moser of Bolt Software
Firewall: Your Computer's First Defense - Real Time Strategy game

Login to post a reply

Server time is: 2024-09-21 18:03:54
Your offset time is: 2024-09-21 18:03:54