|
-
Adjusting Angles of a Physics Engined object
I've been building an application using a physics engine that has the user aim and launch a cannon shell. It uses a physics engine to simulate its firing. That said, however, I cannot make it simulate being at the proper angles while flying through the air.
http://www.cove.org/ape/index.htm
This is the engine I'm using.
I can already obtain the initial angle the shell should be when the cannon is fired, as well as the velocity, both along the x and the y, of the shell. I am hopefully looking for a math formula that could then get the proper angle.
In addition, I have a weird, minor problem. I recently added a one pixel line, which was designed to simulate a ground. However, when it's there, the shell won't be shown by the code anymore when the user fires the cannon. When I remove it, the shell is shown once again. I'm not too sure what the cause of it is.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|