Gamestudio Links
Zorro Links
Newest Posts
Newbie Questions
by fairtrader. 12/05/23 14:22
Zorro Trader GPT
by TipmyPip. 12/04/23 11:34
Square root rule
by Smallz. 12/02/23 09:15
RTest not found error
by TipmyPip. 12/01/23 21:43
neural function for Python to [Train]
by TipmyPip. 12/01/23 14:47
Xor Memory Problem.
by TipmyPip. 11/28/23 14:23
Training with command line parameters
by TipmyPip. 11/26/23 08:42
Combine USD & BTC Pairs In Asset Loop
by TipmyPip. 11/26/23 08:30
AUM Magazine
Latest Screens
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Tactics of World War I
Who's Online Now
3 registered members (TedMar, AndrewAMD, fairtrader), 578 guests, and 0 spiders.
Key: Admin, Global Mod, Mod
Newest Members
fairtrader, hus, Vurtis, Harry5, KelvinC
19019 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Page 1 of 2 1 2
vecOutVelocity #33823
09/23/04 00:40
09/23/04 00:40
Joined: Mar 2003
Posts: 4,427
Japan
A
A.Russell Offline OP
Expert
A.Russell  Offline OP
Expert
A

Joined: Mar 2003
Posts: 4,427
Japan

Can someone explain what vecOutVelocity is, and how to use it?

Re: vecOutVelocity [Re: A.Russell] #33824
09/23/04 01:09
09/23/04 01:09
Joined: Mar 2003
Posts: 5,377
USofA
fastlane69 Offline
Senior Expert
fastlane69  Offline
Senior Expert

Joined: Mar 2003
Posts: 5,377
USofA
As the manual states, this is the INSTANTANOUS velocity of the object at the time you sample the entity. The values returned will be global and relative to the Map, not the Entity. Also, since this is a velocity, you must treat it as a vector. This value is a returned value and thus not set by you, the programmer.

This must be considered in combination with vecpointlocal, which is the point that your are sampling on your entity and is thus a local coordinate relative to the entity. If set to the center, it returns purely the linear velocity. IF set off-center, it will return a combination of linear and rotational velocity. This is a programmer set value, so you must set where you want to set the point.

The biggest thing to remember I think is that vecoutvelocity is a GLOBAL value and thus returns a velocity VECTOR relative to the MAP (+x east, -x west, +y north, -y south, +z sky, -z ground) while vecpointlocal is a LOCAL value and is set to an ENTITIES relative position (+x right, -x left, +y front, -y back, +z above, -z below)

(PS: I'm pretty sure I have the coordinate oriented right for right handedness. If not, please correct me )

Re: vecOutVelocity [Re: fastlane69] #33825
09/23/04 01:19
09/23/04 01:19
Joined: Mar 2003
Posts: 4,427
Japan
A
A.Russell Offline OP
Expert
A.Russell  Offline OP
Expert
A

Joined: Mar 2003
Posts: 4,427
Japan

That was a terrific answer! The only problem is, I didn't understand very much of it.

How can you use whatever-the-heck it returns to find out how fast the entity is moving (in any direction)? For the time being, that will do me. (in quants per tick or frame would be nice).

Last edited by A.Russell; 09/23/04 01:22.
Re: vecOutVelocity [Re: A.Russell] #33826
09/23/04 01:36
09/23/04 01:36
Joined: Mar 2003
Posts: 5,377
USofA
fastlane69 Offline
Senior Expert
fastlane69  Offline
Senior Expert

Joined: Mar 2003
Posts: 5,377
USofA
ROFL

Sorry.

The calls that you have in the other thread are all you need:

IF

phentgetvelocity(my, temp, nullvector)

THEN

1) my is the entity you are sampling (in this case MY entity)
2) temp will be set as the Velocity Vector upon function execution
3) nullvector will mean that you are sampling in at (0,0,0) in the entity, which "should" be the center of the object you are sampling.

Since you are doing balls for you pachinko game (I think? ), make absolutly positively sure that (0,0,0) is the center of the ball. That way, since you have set vecpointlocal=nullvector, you are sampling the center and temp will ONLY be the linear (straight line) velocity or...

temp.x=velocity in the global x direction (east/west)
temp.y=velocity in the global y direction (north/south)
temp.z=velocity in the global z direction (sky/ground)

and I "think" all values will be in quant/frame

Re: vecOutVelocity [Re: fastlane69] #33827
09/23/04 02:26
09/23/04 02:26
Joined: Mar 2003
Posts: 4,427
Japan
A
A.Russell Offline OP
Expert
A.Russell  Offline OP
Expert
A

Joined: Mar 2003
Posts: 4,427
Japan


You forgot that I'm not one of you physics undergrads. I did study physics at high school, and I can still remember what the walls looked like.

Re: vecOutVelocity [Re: A.Russell] #33828
09/23/04 03:01
09/23/04 03:01
Joined: Mar 2003
Posts: 5,377
USofA
fastlane69 Offline
Senior Expert
fastlane69  Offline
Senior Expert

Joined: Mar 2003
Posts: 5,377
USofA
Hehe, no I'm not forgetting, but I am trying to give you as honest and clear an answer as possible. And that means some pretty tough stuff. This is physics we are talking about after all...

In any case, unlike my undergrads, you actually come to me with questions which I am more than happy to field. Keep asking and we'll get you there...eventually!

Re: vecOutVelocity [Re: fastlane69] #33829
09/23/04 03:35
09/23/04 03:35
Joined: Mar 2003
Posts: 4,427
Japan
A
A.Russell Offline OP
Expert
A.Russell  Offline OP
Expert
A

Joined: Mar 2003
Posts: 4,427
Japan


Might be a while, I tend to only study as I come across something I need. Physics gave me a head-ache in my school days. Thanks for your help. I'd like to understand more about physics.

Re: vecOutVelocity [Re: A.Russell] #33830
09/23/04 05:12
09/23/04 05:12
Joined: Mar 2003
Posts: 5,377
USofA
fastlane69 Offline
Senior Expert
fastlane69  Offline
Senior Expert

Joined: Mar 2003
Posts: 5,377
USofA
Always happy to be of help. Continue bugging me if you need any other answers. Otherwise, I'll go back under my rock to eek out a living.

Re: vecOutVelocity [Re: fastlane69] #33831
09/23/04 05:20
09/23/04 05:20
Joined: Mar 2003
Posts: 4,427
Japan
A
A.Russell Offline OP
Expert
A.Russell  Offline OP
Expert
A

Joined: Mar 2003
Posts: 4,427
Japan
Oh, but the holidays are good, aren't they

Re: vecOutVelocity [Re: A.Russell] #33832
09/23/04 06:14
09/23/04 06:14
Joined: Mar 2003
Posts: 5,377
USofA
fastlane69 Offline
Senior Expert
fastlane69  Offline
Senior Expert

Joined: Mar 2003
Posts: 5,377
USofA
Yeah, that's one good thing to say about un-employment: The hours are great!!!

Page 1 of 2 1 2

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