actionscript 3 - is there a way to loop something in infinite speed and not every frame? -


so, if i'm checking in enterframe event listener, , want check (if happens) this. somehow checking every frame slow. there way check in infinite speed , not every frame, when checks something, instantly changes position?

technically, there no way check faster once per frame, if have frame rate @ 60fps. timer limited trigger @ 60 times per second, , same speed can setting stage.framerate too. but, if checking, example, collision of flies fast , obstacle, before obstacle in current frame, , past next frame, can use derivative of axis-aligned bounding box collision detection, , transition collision detection (a probable example here), checking if path intersects bounding box in time between 2 frames.

if checking process depends on factors , time, , can check condition in frame , previous frame, can interpolate process between frames in conventional enterframe listener , check if condition seeking might happen in between, , if might, might check whether did happen interpolating @ smaller time intervals frame. still, you'd better refrain using hittest in such interpolation, costly check, , can receive faster negative results aabb checks , other methods of optimizing collision detection.


Comments

Popular posts from this blog

angularjs - ADAL JS Angular- WebAPI add a new role claim to the token -

php - CakePHP HttpSockets send array of paramms -

node.js - Using Node without global install -