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.

3 Dimensional Chat / problem with mouse tracking of turret (dbpro)

Author
Message
RebirthAnime
22
Years of Service
User Offline
Joined: 11th Oct 2002
Location:
Posted: 14th Feb 2004 08:12
I'm having a problem with my turret's gun on my side scrolling shooter. The gun (turretcannon.x) is supposed to point at the sprite reticle..everything seems to work just fine, except that when you initialize the gun is facing backwards through the turret..it still aims up and down as it should, but it's facing backwards. I've fooled around trying to find the problem, but can't figure it out..anyone got any clue? code is below
RebirthAnime
22
Years of Service
User Offline
Joined: 11th Oct 2002
Location:
Posted: 15th Feb 2004 10:12
does no one know what's wrong?? I still haven't figured it out
walaber
21
Years of Service
User Offline
Joined: 22nd Oct 2003
Location: Los Angeles, CA
Posted: 15th Feb 2004 15:41 Edited at: 15th Feb 2004 15:43
at the top of your code you seem to set up the starting angles for your objects like this:

yrotate object 1,-90
yrotate object 2,-90
yrotate object 3,-90

but after that, you have the "rotate object 1,0,x,0" command... but you never initialize the "x" variable. so the first loop, the objects will be rotated to 0 (what a variable defaults to).

after your:

yrotate object 1,-90
yrotate object 2,-90
yrotate object 3,-90

you might try this:

fix object pivot 1
fix object pivot 2
fix object pivot 3


also, you are actually rotating on the Y axis, so you should change your variable name to "y", or "Y_Angle" or something similar...



Go Go Gadget DBPRO!

Athlon XP 2400+ || DDR-SDRAM 1GB || Nvidia GeForce 4 Ti4200 AGP 8x 128MB

Login to post a reply

Server time is: 2025-06-28 05:35:13
Your offset time is: 2025-06-28 05:35:13