Gamestudio Links
Zorro Links
Newest Posts
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
1 registered members (AndrewAMD), 1,014 guests, and 1 spider.
Key: Admin, Global Mod, Mod
Newest Members
Hanky27, firatv, wandaluciaia, Mega_Rod, EternallyCurious
19051 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
phent_get(local)velocity? #15788
06/08/03 03:50
06/08/03 03:50
Joined: May 2002
Posts: 7,441
ventilator Offline OP
Senior Expert
ventilator  Offline OP
Senior Expert

Joined: May 2002
Posts: 7,441
phent_getvelocity seems to retrieve a global velocity vector. for my airplane i need the velocity component of the entity's x-axis only. what would be the best way to convert the global velocity vector to a local one? could phent_makelocal be used for this purpose?

Re: phent_get(local)velocity? #15789
06/08/03 04:54
06/08/03 04:54
Joined: May 2002
Posts: 7,441
ventilator Offline OP
Senior Expert
ventilator  Offline OP
Senior Expert

Joined: May 2002
Posts: 7,441
i rotated it like that:

phent_getvelocity(my,vel,nullvector);
vec_rotate(vel,vector(-my.pan,-my.tilt,-my.roll));

i think vel.x is what i want then but i am not completely sure?

Re: phent_get(local)velocity? #15790
06/10/03 02:19
06/10/03 02:19
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
@ventilator - I am in a similar situation. I need to know the local velocity vector for my vehicle. Using 'phent_getvelocity' I can tell where the vehicle is moving to but I can't determine if it is moving forward or backward.

Re: phent_get(local)velocity? #15791
06/10/03 02:55
06/10/03 02:55
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
@ventilator - Hey, that seems to work. I could have swore I tried looking at a physics entities pan, tilt, roll before and it wasn't reading anything. I must have done something wrong though highly unlikely....lol. [Razz]


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