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.

2D All the way! / Trigonometry

Author
Message
Code Stealer
20
Years of Service
User Offline
Joined: 12th Feb 2004
Location:
Posted: 3rd Mar 2004 14:50
How does trig work in dark basic?

For example, if I know the vertical and horizontal axis of my triangle, then I should be able to get an angle out of it using
verticle/horizontal= tangent Angle. However, Im not sure on how to write this out in DBpro, and how to get the correct angle.

The trig functions are really important for getting rotational facing and curved trajectories, so come in usefull for help arrows, jumping, throwing and things like pointing a homing missile in the corect direction. Anybody out there who can help with the syntax, please comment!

GIve me more power!
Pincho Paxton
21
Years of Service
User Offline
Joined: 8th Dec 2002
Location:
Posted: 3rd Mar 2004 15:18
I'm no good at that sort of thing, but there is lots of source code that does all this stuff for you. Did you know that there is a codebase on here? It at the top of the page. There might be some stuff on there. Or you could use the search button at the bottom of the page.

Pincho.

Code Stealer
20
Years of Service
User Offline
Joined: 12th Feb 2004
Location:
Posted: 3rd Mar 2004 15:42
I searched the code base, but I cant find any entries for trigonometry, tangent, tan, atan, cos or sin! Maybe you could do better...

GIve me more power!
Pincho Paxton
21
Years of Service
User Offline
Joined: 8th Dec 2002
Location:
Posted: 3rd Mar 2004 15:47
Well I meant search for Jumping, throwing or homing missiles.

Code Stealer
20
Years of Service
User Offline
Joined: 12th Feb 2004
Location:
Posted: 3rd Mar 2004 15:57
Nothing under jumping or throwing or homing missiles!

GIve me more power!
Pincho Paxton
21
Years of Service
User Offline
Joined: 8th Dec 2002
Location:
Posted: 3rd Mar 2004 17:02
Yeah you're right, not much on there. I found 2 jump routines, a throw routine, and a bezier curve routine. They are not using triganometry, just code. Here's one I found....




Login to post a reply

Server time is: 2024-05-17 04:19:28
Your offset time is: 2024-05-17 04:19:28