Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Using Trigometric Functions in VB game.....

Posted on 1999-10-02
7
Medium Priority
?
170 Views
Last Modified: 2010-05-02
Ok,
Now in my game I want to be able to have Auto Rocket thingies that fire Missiles that lock to your ship.  I want to know if anyone has Tutorials(please) or can just inform me on how to use trigometric functions to figure out angles to track the target??

Thanx
Themaxxx
0
Comment
Question by:themaxxx
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
7 Comments
 
LVL 8

Expert Comment

by:vettranger
ID: 2093691
Yep, go down to your local software store and buy a Trig tutorial program, or your local bookstore and buy a Trig book.

Some "How to write games in (misc. programming language)" books have sample code for stuff like that, also.

And its "Trigonometic" ... it comes from Trigonometry, not Trigometry. ;-)
0
 
LVL 10

Expert Comment

by:viktornet
ID: 2093713
you can use cos() sin() tan() arccos() arcsin() arctan() to do just that... what more do you need?

..-=ViKtOr=-..
0
 
LVL 32

Accepted Solution

by:
Erick37 earned 400 total points
ID: 2093714
VB has the functions (to name a few)
Sin
Cos
Exp
Log
Sqr
Tan
Atn

All angles are in Radians not degrees.
There are 2*PI Radians in 360'

This is a great starting point for trig:
http://aleph0.clarku.edu/~djoyce/java/trig/
0
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 

Author Comment

by:themaxxx
ID: 2093934
thanx a lot man

You have basically answered everything about my game problems.  It's coming along great
0
 
LVL 32

Expert Comment

by:Erick37
ID: 2093948
Glad to help.
Let us know when you're done so we can beta test! :-)
0
 

Author Comment

by:themaxxx
ID: 2094171
no problem....
go to www3.edgenet.net/nuke/den_4/den_4_frameset.html
page just got up

0
 
LVL 1

Expert Comment

by:Moondancer
ID: 6859232
This question was awarded, but never cleared due to the JSP-500 errors of that time.  It was "stuck" against userID -1 versus the intended expert whom you awarded.  This corrects the problem and the expert will now receive these points; points verified.

Please click on your Member Profile and select "View Question History" to navigate through any open or locked questions you may have to update and finalize them.  If you are an EE Pro user, you can also choose Power Search to find all your open questions.

This is the Community Support link, if help is needed, along with the link to All Topics which reflects many TAs recently added.

http://www.experts-exchange.com/jsp/qList.jsp?ta=commspt
http://www.experts-exchange.com/jsp/zonesAll.jsp
 
Thank you,
Moondancer
Moderator @ Experts Exchange
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

When trying to find the cause of a problem in VBA or VB6 it's often valuable to know what procedures were executed prior to the error. You can use the Call Stack for that but it is often inadequate because it may show procedures you aren't intereste…
Have you ever wanted to restrict the users input in a textbox to numbers, and while doing that make sure that they can't 'cheat' by pasting in non-numeric text? Of course you can do that with code you write yourself but it's tedious and error-prone …
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…
Suggested Courses

660 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question