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.

DarkBASIC Professional Discussion / kingius , How'd you do that?

Author
Message
The Wendigo
21
Years of Service
User Offline
Joined: 13th Sep 2002
Location: A hole near the base of a tree in the US
Posted: 11th Dec 2002 03:11
I downloaded free form and was playing it and noticed that when you used freeflight rotation it actually worked! Howd you do that? Even with the simplest lines of code mine is a cross between freeflight and euler.

Latest Code:



Help!
1.00 GHZ processor, 256 MB RAM, GeForce 3 64MB, SB Live!, 8 cans of soda per day
kingius
21
Years of Service
User Offline
Joined: 16th Oct 2002
Location:
Posted: 11th Dec 2002 12:01
Not like that, instead its best to rotate on the 3 axis. Remember to rotate on the z to keep left as left, etc.

spooky
21
Years of Service
User Offline
Joined: 30th Aug 2002
Location: United Kingdom
Posted: 11th Dec 2002 12:32
I gave up after trying all sorts of combinations of rotating, turning, pitching, e.t.c.

I am told be Lee that Patch 4 will solve all our problems with free-flight commands.

I love it when a plan comes together
The Wendigo
21
Years of Service
User Offline
Joined: 13th Sep 2002
Location: A hole near the base of a tree in the US
Posted: 16th Dec 2002 02:35
not quite sure what you mean. I tried rotating first like so:

zrotate object 1, curz+roll
yrotate object 1, cury+yaw
xrotate object 1, curx+pitch

That had no effect it seems. Could you place a code snippet?

1.00 GHZ processor, 256 MB RAM, GeForce 3 64MB, SB Live!, 8 cans of soda per day
mimesis
21
Years of Service
User Offline
Joined: 26th Aug 2002
Location: Norway
Posted: 16th Dec 2002 11:53
Like this....

sync on : sync rate 0
color backdrop rgb(0,0,128) : hide mouse
set text font "arial" : set text size 12 : set text transparent

load object "fighter.x",1
position object 1,0,-3,3

do
if leftkey() then dec ay#,.5
if rightkey() then inc ay#,.5
if upkey() then inc ax#,.5
if downkey() then dec ax#,.5

rotate object 1,ax#,ay#,0
sync
loop
Ratty Rat
21
Years of Service
User Offline
Joined: 24th Sep 2002
Location:
Posted: 16th Dec 2002 14:37
Bassi- I don`t think that works, although it does illustrate the problem, IE pressing Left/Right always rotates about the world y axes while pressing up/down rotates around the objects z-axis, at least thats what it does on mine.
mimesis
21
Years of Service
User Offline
Joined: 26th Aug 2002
Location: Norway
Posted: 16th Dec 2002 21:05
Atleat it works, more that u could say about the original code by Wendigo
The Wendigo
21
Years of Service
User Offline
Joined: 13th Sep 2002
Location: A hole near the base of a tree in the US
Posted: 16th Dec 2002 21:31
Bassi, you missed the point.

What I don't understand is, if that works everywhere else (rotating on z first), then how come it doesnt work in DBP?

1.00 GHZ processor, 256 MB RAM, GeForce 3 64MB, SB Live!, 8 cans of soda per day
mimesis
21
Years of Service
User Offline
Joined: 26th Aug 2002
Location: Norway
Posted: 16th Dec 2002 23:54
LOL
What point could I possibly miss on this andvanced
piece of programming of yours.
rapscaLLion
21
Years of Service
User Offline
Joined: 29th Aug 2002
Location: Canada
Posted: 17th Dec 2002 05:35
Ok... what is freeflight rotation?
Lemme guess:
Your model/camera whatever rotates in any direction while it's axis is still moving? Like in that asteroids video game?

Alex Wanuch
aka rapscaLLion
Kousen Dev Progress >> Currently Working On Editors
kingius
21
Years of Service
User Offline
Joined: 16th Oct 2002
Location:
Posted: 17th Dec 2002 10:58
No, free flight rotation is where the turning the camera left always turns it to its left rather than the world's left. Its more complicated than if you just rotate on the y axis for left and right because if you change both the x and y axis then you must spin on the z to turn to the camera's left.

The Wendigo
21
Years of Service
User Offline
Joined: 13th Sep 2002
Location: A hole near the base of a tree in the US
Posted: 22nd Dec 2002 23:41
Sorry, I've been a way for a while. Again though, kingius, could you post a code snippet to show how you did that? I know I could simply probably just wait till patch 4, but I also like to know how things work. I typically try to stay away from programming things I don't understand (call it pride or something), cuz I NEED to know it .

1.00 GHZ processor, 256 MB RAM, GeForce 3 64MB, SB Live!, 8 cans of soda per day

Login to post a reply

Server time is: 2024-05-05 04:24:41
Your offset time is: 2024-05-05 04:24:41