Attention | Topic was automatically imported from the old Question2Answer platform. | |
Asked By | Demiu |
I’m working on weapon pickup and when picked up the weapon freezes in place, disables it’s collision and makes itself invisible. Now I want it to instantly “move” to players position and become visible, however I am unable to get rid of the 1 (maybe more) frame blink of the weapon sprite in the place it was picked up.
So far I’ve tried:
player's input -> weapon drop code (setting places to be moved, disabling sleeping) -> weapon's _integrate_forces (it's a RigidBody2D) -> set state -> call_deferred("show") -> sprite.visible = true
However, even with call_deferred the sprite seems to appear before the body is moved by the physics engine.