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 / ptich object down problems!!!!!

Author
Message
BN2 Productions
20
Years of Service
User Offline
Joined: 22nd Jan 2004
Location:
Posted: 7th Sep 2004 02:38
I have a big problem. When I use the pitch object down command, my object turns down AND to the left about 90 degrees. If I add a turn object right command, the object starts flying in circles around the main character. Why is this happening and how can I fix it? I am using DBC.

Thanks in advance
Philip
21
Years of Service
User Offline
Joined: 15th Jun 2003
Location: United Kingdom
Posted: 7th Sep 2004 03:31
Sounds to me like you've got a logic problem in the loop of your code that does this. Post the relevant section of your code and we'll be able to help more.

Philip

What do you mean, bears aren't supposed to wear hats and a tie? P3.2ghz / 1 gig / GeForce FX 5900 128meg / WinXP home
BN2 Productions
20
Years of Service
User Offline
Joined: 22nd Jan 2004
Location:
Posted: 7th Sep 2004 05:20
This is my main loop and the subroutines that are used


Philip
21
Years of Service
User Offline
Joined: 15th Jun 2003
Location: United Kingdom
Posted: 7th Sep 2004 05:56
Nope, not enough to go on there I think. Have you tried putting in breaks into the code to see what line is causing the turn to the left?

Philip

What do you mean, bears aren't supposed to wear hats and a tie? P3.2ghz / 1 gig / GeForce FX 5900 128meg / WinXP home
BN2 Productions
20
Years of Service
User Offline
Joined: 22nd Jan 2004
Location:
Posted: 7th Sep 2004 06:16
yes. the line that causes it to actually turn left is the pitch object down line. I am not sure though if there is another line before that somehow influences it.

here is the full code(sorry, it is kind of a mess.)
Philip
21
Years of Service
User Offline
Joined: 15th Jun 2003
Location: United Kingdom
Posted: 8th Sep 2004 04:00
Ok. I shall try and look at this code this evening. I'm making no promises though as I have a ton of things to do.

Philip

What do you mean, bears aren't supposed to wear hats and a tie? P3.2ghz / 1 gig / GeForce FX 5900 128meg / WinXP home
Philip
21
Years of Service
User Offline
Joined: 15th Jun 2003
Location: United Kingdom
Posted: 11th Sep 2004 02:49
Because of heavy work committments and 16 hour working days I have not been able to get around to looking at your code. I hope to find time to look at it during the weekend. However, in case this does not occur, I have also emailed Jess and, as he is a DBC guru, asked whether he can help.

Philip

What do you mean, bears aren't supposed to wear hats and a tie? P3.2ghz / 1 gig / GeForce FX 5900 128meg / WinXP home
Jess T
Retired Moderator
21
Years of Service
User Offline
Joined: 20th Sep 2003
Location: Over There... Kablam!
Posted: 11th Sep 2004 20:50
Mate, I had a massive explanation about what was wrong with the source, and a whole load of tips about how to fix some things up, and then Window's shat itself and died, here's a brief summary:

When you pitch the object down, you are increasing the gravity value each time by .2, as this get's bigger, eventually, it will reach values like 45 and 90, so when you pitch the object down, it will be turning by 45 or 90 degree's each time ( and eventually will be doing full 360's on the spot )
That explains why the bullet does circles around the player object when fired.

To fix that, you should try a different approach, such as changing the object's y position, and moving it at a constant rate along the x/z plain. You can use a Sin curve to work that out, or you can just start the object's upward velocity as say 50, then lower it by 1 or .5 each loop and position the object at it's current position plus the velocity, this will simulate the gravity.

This should also solve the problem of pitching the object and having it turn to the side ( which I can't explain ).

Jess.


Team EOD :: Programmer/Logical Engineer/All-Round Nice Guy
Philip
21
Years of Service
User Offline
Joined: 15th Jun 2003
Location: United Kingdom
Posted: 13th Sep 2004 01:16
Thanks Jess.

Philip

What do you mean, bears aren't supposed to wear hats and a tie? P3.2ghz / 1 gig / GeForce FX 5900 128meg / WinXP home

Login to post a reply

Server time is: 2024-11-27 09:42:09
Your offset time is: 2024-11-27 09:42:09