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 / DBPro: Few Questions on 3PS game.

Author
Message
Xender
18
Years of Service
User Offline
Joined: 28th Apr 2006
Location:
Posted: 2nd Jun 2006 16:19
hey, i think i am making pretty good progress on my game for working on it a lil bit everday, and after a bit of searching and trying stuff out, i just came to a few bit of questions, first off here is my code

my main question is how come when i shoot the bullets, they dont go to the crossair, they always end up shooting right below it, also is there a way to make it so when i look up with the mouse, the camera swings down so then i dont loose site of the the oject its following. thanks so much if you can help
Virtual Nomad
Moderator
18
Years of Service
User Offline
Joined: 14th Dec 2005
Location: SF Bay Area, USA
Posted: 2nd Jun 2006 21:16
they are going to the crosshair but you're mixing 3d Y Coordinates and 2d Y Coordinates. the Heights of your bullets are starting at whatever the hero is at so, unless the target is very near the same height, the bullets will pass above or below (watch the bullet's path and where it crosses the horizon on the crosshair. it's not just "below", as you'd assumed) the target. remove the matrix randomization and see what i mean. if everything is on a level playing field (flat/same 3d Y coord), the bullet "passes" through the crosshair dead center.

as far as the camera control you desire, you'll need to differentiate between your mouselook feature and the automatic camera commands you're using. you might try something like using the right mouse button. as soon as it's pressed, lock in the current camera values and, while it's held down, allow for the mouse to affect the camera. then, when it's released, use wrapvalue or whatever effect you want, to swing or snap the camera back to where it was before RMB was pressed.

Virtual Nomad
Athlon XP1800+, Windows XP+SP2, Soyo K7V Dragon+ MB, 1.5Gb 333 RAM, ATI Radeon 8700LT (128Mb)
Virtual Nomad
Moderator
18
Years of Service
User Offline
Joined: 14th Dec 2005
Location: SF Bay Area, USA
Posted: 2nd Jun 2006 21:23
grrr. "EDIT" is bugged!

Quote: "
There was an error connecting to or querying the SQL database.
Debug Information at :
SQL Query Failed
...
"


anyway, was just gonna wish you good luck. i'd offer help on the bullet path problem, but, judging from your code, i'm sure you'll be able to work it out

Virtual Nomad
Athlon XP1800+, Windows XP+SP2, Soyo K7V Dragon+ MB, 1.5Gb 333 RAM, ATI Radeon 8700LT (128Mb)
Virtual Nomad
Moderator
18
Years of Service
User Offline
Joined: 14th Dec 2005
Location: SF Bay Area, USA
Posted: 2nd Jun 2006 21:27
<sighs>

someone please fix the edit? heh.

above i meant to say curvevalue not wrapvalue

Virtual Nomad
Athlon XP1800+, Windows XP+SP2, Soyo K7V Dragon+ MB, 1.5Gb 333 RAM, ATI Radeon 8700LT (128Mb)
Xender
18
Years of Service
User Offline
Joined: 28th Apr 2006
Location:
Posted: 3rd Jun 2006 20:01
strange, i got rid of my randomize matrix command, so everything was flat, and when i shot it still seemed to shoot below the crossair, would having a hidden limb be a better way to do it? having a limb strech out a certain distance and have the bullet follow it or something, idk im still tryign to fix a few other things like stupid random positions lol but i just did a search so i kno what to do for that, just stupid bullets not going to where u think they would go, thks for help though.
Xender
18
Years of Service
User Offline
Joined: 28th Apr 2006
Location:
Posted: 4th Jun 2006 18:33
wait, would it be possible to have a 3D crossair, that when u dont have 2d and 3d coordinates? or is that just a whole nother big problem? im just wondering cuz that could make it work. w/e im gonna search it now
Xender
18
Years of Service
User Offline
Joined: 28th Apr 2006
Location:
Posted: 5th Jun 2006 17:47 Edited at: 5th Jun 2006 17:55
k i gave up on having the bullets going straight, ill figure that out later. but i got another question now, still on the same lines with bullets,, this time colliding with my matrix .
what i am trying to get is a check to see if a bullet hit the terrain, (matrix) and if it did it will just hide it, so u cant shoot threw a hill. this is my bullet code right now (taken from code from above):
before main looP:


and this is a gosub that just gets called in the do loop

i tried changing the gosub shoot to include a actual value for x y and z values, but it wouldnt work,this is what i tried but didnt work

but it doesnt work, i think it has something to do with me getting the ground height, and not really updating the values once its shot or ,, i really have no clue.
any help with the bullets hitting the terrain will help a lot, thanks.

Login to post a reply

Server time is: 2024-11-12 10:25:19
Your offset time is: 2024-11-12 10:25:19