Gamestudio Links
Zorro Links
Newest Posts
Z9 getting Error 058
by k_ivan. 04/25/26 19:13
ZorroGPT
by TipmyPip. 04/25/26 16:09
Stooq now requires an API key
by jcl. 04/13/26 09:42
Strange "Alien" Skull created with >Knubber<
by NeoDumont. 04/10/26 18:58
400 free seamless texture pack downl. here !
by NeoDumont. 04/08/26 19:55
AUM Magazine
Latest Screens
Dorifto samurai
Shadow 2
Rocker`s Revenge
Stug 3 Stormartillery
Who's Online Now
1 registered members (Quad), 3,790 guests, and 8 spiders.
Key: Admin, Global Mod, Mod
Newest Members
valino, juergenwue, VladMak, Geir, ondrej
19209 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 | 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