Move Static Body with by parent

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By alzy

I am writing a rhythm game where all the note blocks are children of a Spatial Node called the MidiRail. The way I want to handle whether the block was hit in time is to detect whether the note block is colliding with the players note trigger block when the player plays the note. Seems simple enough, however I want do not want the note blocks to move. Instead I want the parent Spatial Node which is containing the note blocks to move this way I only have to move the parent to set all the blocks in motion. I am currently doing this by setting the MidiRail’s translate which I am aware does not work with the physics engine. How can I detect collisions while only setting the parents position? (I do not want to set a velocity if possible, I want to dictate the position myself)

If you just want to detect if a collision happened why not use an Area instead of a the full StaticBody physics object and listen for the area_entered signal?

tastyshrimp | 2019-12-19 22:08