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 / A small Issue

Author
Message
Lame Brain
19
Years of Service
User Offline
Joined: 28th Apr 2005
Location: Portland, OR
Posted: 29th Apr 2005 05:43 Edited at: 5th May 2005 03:52
Hello.
I'm working on a project, and I have run into a small issue.
When my ship fires its cannon, the shots go wildly off course!
I have tried using the point object and moving my bullets backwards, as well as using the rotate object command and moving my bullets forwards, but neither seems to work.

Here is my code, it dosn't need any media files:

Any help/assistance/advice greatly appreciated!

I'm using DBPro.

Another hair-brained idear from... LAME BRAIN!
Lame Brain
19
Years of Service
User Offline
Joined: 28th Apr 2005
Location: Portland, OR
Posted: 30th Apr 2005 01:23
Perhaps a little more explanation is required.
What i'm trying to do is simply assign my bullets an angle that matches my camera angle, but when I move the bullet objects, they don't move the way my camera is facing!

Also I have trapped my Camera's XYZ coordinates, and they seem to behave strangely as I move. In short, I think that my camera is behaving oddly, but I can't figure out why for the life of me!

My source is under my first post. Please Help!

(Formerly Posting as Social Disease)
Lame Brain
19
Years of Service
User Offline
Joined: 28th Apr 2005
Location: Portland, OR
Posted: 1st May 2005 10:17
I've been working on this a little more, and what I've found is this: When I move strictly oalong the Z axis, everything is fine, but if I move along either the X or the Y axis, I find that there are variations on the Z axis as well. They are small, to be sure, but present none the less.

Have I done something wrong in my movement commands? I wonder if it has something to do with how I'm sliding my camera, buy turning it, and then moving it, and then turning it back? hmm, I'll check that.

My basic question remains the same, however, why do my bullets travel so far wide of my camera angle, when I am clearly setting them to have the same angle? Any ideas? please!

(Formerly Posting as Social Disease)
Lame Brain
19
Years of Service
User Offline
Joined: 28th Apr 2005
Location: Portland, OR
Posted: 1st May 2005 10:44
okay, I got the whole movement issue corrected. But my bullets still don't seem want to fly at my camera angle. I'm reposting my code as its quite a bit cleaner now, and shows the pertinent controls better.

As I said, I appreciate any feedback on my program in general, and on my problem in particular.



Another hair-brained idear from... LAME BRAIN!
Lame Brain
19
Years of Service
User Offline
Joined: 28th Apr 2005
Location: Portland, OR
Posted: 1st May 2005 10:59
Bla! I hate feeling stupid!
Ok, just in case any body is following this thread, the answer is a little command called: SET OBJECT TO CAMERA ORIENTATION
plus I was still moving my bullets backwards (hello? duh!)

seems pretty obvious huh? yeah, well lesson learned, next time I'll do a more thourough search on the forums rather than posting every little trivial problem!


Oh, here's the working code, just in case anybody cares:

Another hair-brained idear from... LAME BRAIN!
Lame Brain
19
Years of Service
User Offline
Joined: 28th Apr 2005
Location: Portland, OR
Posted: 1st May 2005 13:56


Another hair-brained idear from... LAME BRAIN!
RiiDii
19
Years of Service
User Offline
Joined: 20th Jan 2005
Location: Inatincan
Posted: 1st May 2005 17:05
Good work. I missed this thread - I could of helped. Sorry. Good job of figuring out though!

"Droids don't rip your arms off when they lose." -H. Solo
REALITY II
Baggers
20
Years of Service
User Offline
Joined: 31st May 2004
Location: Yonder over dem dere hills
Posted: 1st May 2005 18:01
Yeah well done...but the edit button is your friend !

Lame Brain
19
Years of Service
User Offline
Joined: 28th Apr 2005
Location: Portland, OR
Posted: 2nd May 2005 04:35
@Baggers -- sorry about that, My posts don't automatically post when I post them, I'm still "Untrusted." (grumble... takes to long... grumble"

Anyway, I've got another issue. I've been progressing merrily along since my last post, and now my ship can shoot bullets and hit the 'roids.

What I want to happen is for the 'roids to fly off once the bullets hits them. I tried to do this by making the 'roids face the bullet and then scuttle off backwards, but they are not behaving as I would expect. Can any one tell me if this is a simple bug in my exsiting code? (I doubt it) Or can anyone suggest a better way to do this?

Anyway, here's the complete code, it dosn't need any media so go ahead and try it out.




--Thanx!

Another hair-brained idear from... LAME BRAIN!
Lame Brain
19
Years of Service
User Offline
Joined: 28th Apr 2005
Location: Portland, OR
Posted: 4th May 2005 01:56
*coughs embarrassedly*... Bump

Another hair-brained idear from... LAME BRAIN!
RiiDii
19
Years of Service
User Offline
Joined: 20th Jan 2005
Location: Inatincan
Posted: 4th May 2005 15:45
Without looking too deep into the code, I think I had a similar issue once. The problem was that the bullet didn't always collide in "front" of the enemy. So the solution isn't to face the bullet, but instead face the source of the bullet (i.e. the player). If that doesn't help, what about simply setting the roid's speed to a negative number?

"Droids don't rip your arms off when they lose." -H. Solo
REALITY II
Lame Brain
19
Years of Service
User Offline
Joined: 28th Apr 2005
Location: Portland, OR
Posted: 5th May 2005 03:49
Of Course! The problem is that when I have the roid face the bullet, the bullet is actually inside the roid! that's why they travel off in weird directions! Thank you RiiDii!

As for setting the roid's speed negative, I move them like this;

so they're moving backwards.

I think I'll try another command I just found, set object to object orientation. Although I was hoping to get a better physics response

oh, well, at least it'll work!

Another hair-brained idear from... LAME BRAIN!

Login to post a reply

Server time is: 2024-09-23 19:34:30
Your offset time is: 2024-09-23 19:34:30