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 2 of 2 1 2
Re: Get Velocity? [Re: fastlane69] #33811
09/23/04 02:23
09/23/04 02:23
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

Perfect!

Thanks Fastlane.

Last edited by A.Russell; 09/23/04 02:27.
Re: Get Velocity? [Re: A.Russell] #33812
09/23/04 02:32
09/23/04 02:32
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

Of course, if GS has a continuous collision technique this wouldn't be needed.....

Re: Get Velocity? [Re: A.Russell] #33813
09/23/04 03:08
09/23/04 03:08
Joined: Mar 2003
Posts: 5,377
USofA
fastlane69 Offline
Senior Expert
fastlane69  Offline
Senior Expert

Joined: Mar 2003
Posts: 5,377
USofA
Ooops, just remembered.

replace vec_length(temp)<10 with abs( vec_length(temp) )<10.


The magnitude of the vector returned by vec_length could be negative AND large and thus trigger your routine. For example, if the velocity is -100 down, it would trigger your routine eventhough the ball is moving fast down. Using abs (or absolute value) will mean that the number will always be positive and thus only small values of temp (ie small values of velocity) should enact you're behaiviour.

Re: Get Velocity? [Re: fastlane69] #33814
09/23/04 03:30
09/23/04 03:30
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

Thank you, though it was working with what you gave me. I'll make the change.

Re: Get Velocity? [Re: A.Russell] #33815
09/23/04 05:10
09/23/04 05:10
Joined: Mar 2003
Posts: 5,377
USofA
fastlane69 Offline
Senior Expert
fastlane69  Offline
Senior Expert

Joined: Mar 2003
Posts: 5,377
USofA
It might be that vec_length automatically sets the absolute value or that the coordinates you are using wouldn't run into this problem.

In any case, glad to hear it's working!

Page 2 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