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 / Roll effect

Author
Message
Cortez
20
Years of Service
User Offline
Joined: 27th Feb 2004
Location: Montreal.Quebec
Posted: 19th Mar 2004 15:40
My problem is the roll effet for my spaceship (first person view)
I use this code to roll the ship:



When the camera is in line with the z axe (angle y= 0), everything work, but when I rotate the ship (angle y = 45) the roll effect don`t really work because I`m not in line with the z axe anymore.

How can I fix this?
Thanks
FROGGIE!
20
Years of Service
User Offline
Joined: 4th Oct 2003
Location: in front of my computer
Posted: 19th Mar 2004 15:52
try doing this:



also u shud change how it rotates on the Y,X axis to something like this as well

my games are only as good as the people who play them...
so if my game is crap then its your f******g fault!
Cortez
20
Years of Service
User Offline
Joined: 27th Feb 2004
Location: Montreal.Quebec
Posted: 21st Mar 2004 18:57
I tried to change my "control" codes like you suggest, but the roll effect still don`t work...

do you have another suggestion?
spooky
22
Years of Service
User Offline
Joined: 30th Aug 2002
Location: United Kingdom
Posted: 21st Mar 2004 20:21
If using DBPro then to do a spaceship game you need to use the 'free-flight' rotation commands ROLL, TURN, PITCH. These will rotate your ship around its own axis. So to roll your ship left, ROLL OBJECT LEFT obj,value. There is a major problem in using these free-flight commands in that the OBJECT ANGLE commands return jibberish. You can however use WOLF's free rotation dll which allows you all sorts of nice rotation stuff. See here for details: http://www.thegamecreators.com/?m=forum_view&t=27422&b=5

Boo!
Shadow
21
Years of Service
User Offline
Joined: 17th Oct 2002
Location: In the shadows
Posted: 21st Mar 2004 22:04
By the way "if keystate(number)=1" is equivalent to just typing "if keystate(number)"
Cortez
20
Years of Service
User Offline
Joined: 27th Feb 2004
Location: Montreal.Quebec
Posted: 22nd Mar 2004 15:49
I`m not using DBpro...
And I still Have my movements (roll effect) problem.
Here`s the situation. I first did my movements code using this:



In this situation, I got left-right + up-down movement with a smooth effect. I also have the straf movement. but with this kind of code logic, I can`t do the roll effect (I also tried with FROGGIE! suggestion).

So I tried with something else. I saw in the code section here, and in the dark basic example, the free flight but only by moving an object in front of the camera and then moving the camera. so I create an hidden object and then move this object. By doing this, I got all the movement I wants, but...I can`t get the smooth (acceleration) effect...

here`s the code



Finaly, my questions:
I will like to know from someone with more experience if it`s ok to use the hidden object to do a first person view game(space sim)?
Also how to improve the codes to add the smooth effect?

Thanks

Login to post a reply

Server time is: 2024-09-22 02:30:27
Your offset time is: 2024-09-22 02:30:27