|
How to receive linear velocity?
#15842
06/23/03 02:09
06/23/03 02:09
|
Joined: Sep 2001
Posts: 237 Maine, USA
Jason Bryant
OP
Member
|
OP
Member
Joined: Sep 2001
Posts: 237
Maine, USA
|
I can't seem to get the linear velocity of my physics object. When I use phent_getvelocity, I can't seem to get only the linear velocity. It seems to be a combination of linear and angular velocity. I may just be using the command incorrectly, but there isn't an example of it being used in the manual. Would someone please post a simple example that shows how to get the linear velocity of an object using phent_getvelocity? Thanks, Jason
|
|
|
Re: How to receive linear velocity?
#15843
06/23/03 17:36
06/23/03 17:36
|
Joined: Oct 2001
Posts: 1,407 Helsinki, Finland
Phantom88
Expert
|
Expert
Joined: Oct 2001
Posts: 1,407
Helsinki, Finland
|
code:
phent_getvelocity(my, temp, nullvector);
Now Temp is the linear velocity.
~Phantom88~
Programmer, Gamer
ICQ #: 157485106 | Xfire: Phantom1988 | MSN: lauri_andler@hotmail.com | AIM: FinPhantom | YAHOO: FinPhantom
|
|
|
Re: How to receive linear velocity?
#15844
06/24/03 00:19
06/24/03 00:19
|
Joined: Sep 2001
Posts: 237 Maine, USA
Jason Bryant
OP
Member
|
OP
Member
Joined: Sep 2001
Posts: 237
Maine, USA
|
code:
str_cpy(temp_str1,"L Vel: "); draw_text(temp_str1,400,30,vector(150,75,75)); phent_getvelocity(ball,temp,vector(0,0,0)); temp2 = vec_dist(temp,vector(0,0,0)); str_for_num(temp_str1,temp2); draw_text(temp_str1,450,30,vector(150,75,75));
The above code is what I'm using... is this correct? temp2 still appears to be affected by the angular velocity of the ball...
Jason
|
|
|
Re: How to receive linear velocity?
#15845
06/24/03 01:12
06/24/03 01:12
|
Joined: Jul 2000
Posts: 2,037 Lafayette, LA USA
James Snydstrup
Senior Expert
|
Senior Expert
Joined: Jul 2000
Posts: 2,037
Lafayette, LA USA
|
quote: phent_getvelocity(ball,temp,vector(0,0,0));
According to the manual you should get linear velocity using the above command. However, I haven't had any luck getting the linear velocity from any physics object that rotates i.e wheels using the above line of code.
|
|
|
Re: How to receive linear velocity?
#15846
06/24/03 01:24
06/24/03 01:24
|
Joined: Sep 2001
Posts: 237 Maine, USA
Jason Bryant
OP
Member
|
OP
Member
Joined: Sep 2001
Posts: 237
Maine, USA
|
I had read these posts before: http://www.conitecserver.com/ubb/ultimatebb.php?ubb=get_topic;f=32;t=000011but I had thought that I would still be able to obtain the linear velocity. The physics object I'm trying to get the information for is a rolling ball. I must be having the same problem as you then James. I wasn't sure if I was interpreting and using the commands correctly. Thanks, Jason
|
|
|
|