Gamestudio Links
Zorro Links
Newest Posts
FXCM => AVA Trade Plugin???
by Martin_HH. 11/17/26 17:02
contractUpdate() is filtering if >2 rows
by mistery. 11/09/26 12:06
New Zorro version 3.15
by jcl. 11/09/26 09:24
Removing outliers from files
by jcl. 11/04/26 10:30
[MED] Import from FBX (2010) missing!!!
by rayp. 11/03/26 14:33
What are you working on?
by rayp. 11/02/26 13:57
AUM Magazine
Latest Screens
Dorifto samurai
Shadow 2
Rocker`s Revenge
Stug 3 Stormartillery
Who's Online Now
3 registered members (AndrewAMD, Martin_HH, 1 invisible), 30,468 guests, and 3 spiders.
Key: Admin, Global Mod, Mod
Newest Members
rht, MaliceTheMaker, Haitao_Ren, JimSimons, julienp
19249 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
accelerate problem #364521
03/18/11 22:05
03/18/11 22:05
Joined: Apr 2009
Posts: 141
dakilla Offline OP
Member
dakilla  Offline OP
Member

Joined: Apr 2009
Posts: 141
hey, I have used accelerate and vec_accelerate a lot recently however I am completely frustrated with it in this occasion. Is it that I cannot use vec_accelerate and accelerate in the same function? - I cannot see a reason why not, however when I try and use this code:

var aspeed = 0;
vec_add(camera.pan,accelerate(aspeed,0,0));

The variable aspeed switches between 9 and -9 within every second and the camera pans all over the place. Notice that there is no input into the acceleration function and no friction, so all i would expect is there to be no camera movement. If it means anything, in the same function I am using vec_accelerate but all of the variables and vectors have different names.

Thanks for any helps


One day there will be an unfixable bug,
That day is not today.
Re: accelerate problem [Re: dakilla] #364524
03/18/11 22:13
03/18/11 22:13
Joined: Jan 2002
Posts: 4,225
Germany / Essen
Uhrwerk Offline
Expert
Uhrwerk  Offline
Expert

Joined: Jan 2002
Posts: 4,225
Germany / Essen
you can use vec_accelerate and accelerate as often in as many function as you like.

I am sorry, but "vec_add(camera.pan,accelerate(aspeed,0,0));" is nonsense. vec_add expects two vectors. Accelerate returns the distance to cover in quants, i.e. a scalar. I guess the other two missing vector elements will be random memory from the stack in your case. Apart from that: calling accelerate with a friction and an acceleration of 0 does not make any sense.


Always learn from history, to be sure you make the same mistakes again...

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