realbasic-nug
[Top] [All Lists]

Re: Shooting in right direction

To: REALbasic NUG <realbasic-nug at lists dot realsoftware dot com>
Subject: Re: Shooting in right direction
From: "Joseph J. Strout" <joe at realsoftware dot com>
Date: Wed, 30 Nov 2005 08:22:30 -0700
Delivered-to: realbasic-nug at lists dot realsoftware dot com
References: <b619b1330511300106y7d3f83a6p6d19dbe924da2275 at mail dot gmail dot com>
At 10:06 AM +0100 11/30/05, Maarten wrote:

Atm the bullet just goes in a straight line left or
right but when you jump the guy rolls in the air so the gun isn't pointed
right or left.

But it's standard in such games for the shot to go straight left/right in such cases (see Metroid for a great example), even if the guy is spinning. Actually, IIRC, firing the gun usually stops the spin.

 Is there an easy way to determine how the gun is pointed? If
not i'll just make a function that returns what way to go...

You ought to be able to compute it from where he is in the spin. But perhaps that's what you already have in mind.

Best,
- Joe

--
Joe Strout                          REAL Software, Inc.

Vote for REALbasic (twice!) in the LinuxWorld Reader's Choice Awards:
http://linux.sys-con.com/general/readerschoice.htm
_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>

Search the archives of this list here:
<http://support.realsoftware.com/listarchives/lists.html>

<Prev in Thread] Current Thread [Next in Thread>