0 votes

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.

in Engine by (27 points)

Please log in or register to answer this question.

Welcome to Godot Engine Q&A, where you can ask questions and receive answers from other members of the community.

Please make sure to read How to use this Q&A? before posting your first questions.
Social login is currently unavailable. If you've previously logged in with a Facebook or GitHub account, use the I forgot my password link in the login box to set a password for your account. If you still can't access your account, send an email to webmaster@godotengine.org with your username.