ComSer Forum
Welcome, Guest. Please login or register.
Did you miss your activation email?
September 03, 2010, 08:04:19 AM

Login with username, password and session length
Search:     Advanced search
If you have any questions about ComSer, please ask them in the ComSer F.A.Q. board.
8079 Posts in 701 Topics by 852 Members
Latest Member: marcusforeman
* Home Help Search Calendar Login Register
+  ComSer Forum
|-+  Gusanos Forum
| |-+  Gusanos Modding
| | |-+  Questions about velocities and accelerations
0 Members and 1 Guest are viewing this topic. « previous next »
Pages: [1] Go Down Print
Author Topic: Questions about velocities and accelerations  (Read 833 times)
eldacar
Veteran Member
****

Karma: 2
Offline Offline

Posts: 189


View Profile
« on: December 28, 2005, 10:27:13 PM »

The spd() will return the speed/velocity of an object as a tuple. Is there any way to then set the velocity of an object as a tuple? If I understand correctly, add_angle_speed() will only add speed in the direction of the object.
Is there a corresponding function to spd() that will return the acceleration of an object?
Logged
sindalf
Veteran Member
****

Karma: 8
Offline Offline

Posts: 264


Further than beyond...ProjectX


View Profile
« Reply #1 on: December 29, 2005, 02:45:41 AM »

Well you could make an second object of the specified object. The first object will be accerlerating to a specified speed, and then it dieds and spawns the second object that is having the speed of the first object, but is deccerlerating to a specified speed.
Logged
eldacar
Veteran Member
****

Karma: 2
Offline Offline

Posts: 189


View Profile
« Reply #2 on: December 29, 2005, 07:39:28 PM »

If I had an object moving 10 to the right (->) saved the angle, then changed the angle to up (^) and added 10 to the speed with add_angle_speed, and then changed the angle back to the right, what would happen? Would the object be point to the right, but moving at 14.142 to the top-right?
Logged
basara
Administrator
Historic Member
*****

Karma: 31
Offline Offline

Posts: 840



View Profile
« Reply #3 on: December 30, 2005, 04:05:51 AM »

Exactly that. Sorry about ignoring you the other day btw ;>
Logged
eldacar
Veteran Member
****

Karma: 2
Offline Offline

Posts: 189


View Profile
« Reply #4 on: December 30, 2005, 04:23:17 AM »

No prob Smiley

What are angles measured in btw? Degrees/radians? Where is 0 and which way is positive (if that makes any sense).

Oh, and it would be helpful if the default console variables values could be added to the docs.
« Last Edit: December 30, 2005, 04:28:39 AM by eldacar » Logged
basara
Administrator
Historic Member
*****

Karma: 31
Offline Offline

Posts: 840



View Profile
« Reply #5 on: December 30, 2005, 04:48:11 AM »

degrees, 0 is up 90º is right etc..

EDIT: Hmm.. wait a second.. I made a mistake Cheesy add_angle_speed wont add speed in the direction the object aims, it will add to the angular speed.
« Last Edit: December 30, 2005, 04:51:11 AM by basara » Logged
Pages: [1] Go Up Print 
« previous next »
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1 RC3 | SMF © 2001-2006, Lewis Media Valid XHTML 1.0! Valid CSS!