You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm just really looking for the chance to have the engine do it's basic velocity-position updating (Engine.js: Engine._bodiesUpdate), but then get to run a bit of my own code before any of the collision detection begins. Then I could make whatever minor tweaks I feel I need, like if a body slightly overshot a target destination in that frame, I could repositions them to be precise, and then there would be no chance of an incorrect detection being made.
Example: player clicks to move 25px away, and velocity has then going 10px per frame. Each frame I'd check if target pos is between prev and curr pos (20 and 30), and if so, hard-set to desired pos, and negate velocity, THEN collisions are checked, no chance of hitting some thing that was originally 28px along the path.
The text was updated successfully, but these errors were encountered:
I'm just really looking for the chance to have the engine do it's basic velocity-position updating (Engine.js: Engine._bodiesUpdate), but then get to run a bit of my own code before any of the collision detection begins. Then I could make whatever minor tweaks I feel I need, like if a body slightly overshot a target destination in that frame, I could repositions them to be precise, and then there would be no chance of an incorrect detection being made.
Example: player clicks to move 25px away, and velocity has then going 10px per frame. Each frame I'd check if target pos is between prev and curr pos (20 and 30), and if so, hard-set to desired pos, and negate velocity, THEN collisions are checked, no chance of hitting some thing that was originally 28px along the path.
The text was updated successfully, but these errors were encountered: