#STATICBODY2d and Area2d
1 messages · Page 1 of 1 (latest)
if u mean it cant go through it then u could make a staticbody 2d and put an area2d next to it
it would be janky but it would work
u could also delete the area 2d if u need
I guess he wants custom collision behavior. An area could be valid for that
I could use impulses tho but it adds to velocity making the action looks like being kicked
Do you need it to work from all directions?
Instead of an area, you could use a static body as wall and check on the moving object for collisions.
func _physics_process(delta: float) -> void:
var collision = move_and_collide(velocity * delta)
if collision:
velocity = velocity.bounce(collision.get_normal())
Owh so you see i dont UNDERSTAND gdscript thats why i dont know how it works
U can use staticbody to make things that touches bounce?
Im new to godot
Hmm, you should start with something simpler then maybe ^^'
You need to script to make collisions work, especially if you want your own collisions
bye
Unity is way better
Nobody stops you xD
But littraly i have to learn godot for school
You can read into collisions here: https://docs.godotengine.org/en/stable/tutorials/physics/physics_introduction.html
In game development, you often need to know when two objects in the game intersect or come into contact. This is known as collision detection. When a collision is detected, you typically want somet...