Gamestudio Links
Zorro Links
Newest Posts
Free Live Data for Zorro with Paper Trading?
by AbrahamR. 05/18/24 13:28
Change chart colours
by 7th_zorro. 05/11/24 09:25
Data from CSV not parsed correctly
by dr_panther. 05/06/24 18:50
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
4 registered members (degenerate_762, AbrahamR, AndrewAMD, ozgur), 667 guests, and 8 spiders.
Key: Admin, Global Mod, Mod
Newest Members
Hanky27, firatv, wandaluciaia, Mega_Rod, EternallyCurious
19051 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
How to receive linear velocity? #15842
06/23/03 02:09
06/23/03 02:09
Joined: Sep 2001
Posts: 237
Maine, USA
J
Jason Bryant Offline OP
Member
Jason Bryant  Offline OP
Member
J

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. [Frown]

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 Offline
Expert
Phantom88  Offline
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
J
Jason Bryant Offline OP
Member
Jason Bryant  Offline OP
Member
J

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
J
James Snydstrup Offline
Senior Expert
James Snydstrup  Offline
Senior Expert
J

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
J
Jason Bryant Offline OP
Member
Jason Bryant  Offline OP
Member
J

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=000011

but 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


Moderated by  HeelX, Spirit 

Gamestudio download | chip programmers | Zorro platform | shop | Data Protection Policy

oP group Germany GmbH | Birkenstr. 25-27 | 63549 Ronneburg / Germany | info (at) opgroup.de

Powered by UBB.threads™ PHP Forum Software 7.7.1