0 votes

So I have a bomb (kinematic) on the floor, when it explodes,its collision shape becomes larger, to defeat enemys, but the thing is that the collision shape when become larger, hit the ground and goes up, like it pushes it. So how can I disable the solid collision shape without pierce the floor? Because changing the layer or disabling it make the floor and the bomb pierce each other

in Engine by (126 points)

1 Answer

+1 vote
Best answer

How about you use 2 physics objects?

One for the bomb on a layer/mask which will collide with the floor so it sits in place. Then another which is pinned to it on a layer/mask which doesn't collide with the floor or the bomb, then "grow" that one out.

by (59 points)
selected by

so I find out this, if i disable gravity (code below) the bomb don´t goes up, I am adding gravity like this, so don´t understand what is happening

var speed = 500
var gravity = 10000
var velocidad = Vector2()

velocity.y += gravity * delta
var move = velocity * delta

I solve it, it was that I didn´t set physic to false, so it´s kept moving, and also I add another physyc objet, thanks works, perfectly now

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.