this is a one way collisions, but i can use zig zag movement to pass through it how to fix that ?

Godot Version

Godot_v4.4.1-stable

Question

this is a one way collisions, but i can use zig zag movement to pass through it how to fix that ?

Code

`extends CharacterBody2D

const SPEED = 300.0
const ROTATION_SPEED = 10.0

func _physics_process(delta: float) → void:

var direction := Input.get_vector("p1left", "p1right", "p1up", "p1down")

# Move and rotate car
if direction != Vector2.ZERO:
    velocity = direction * SPEED
    rotation = lerp_angle(rotation, direction.angle(), ROTATION_SPEED * delta)
else:
    velocity = Vector2.ZERO

move_and_slide()`

video here - https://discord.com/channels/1235157165589794909/1397953799708213288/1397953883409481729

I can’t open this video, please upload to Youtube or Streamable, or anything else that will be publicly available.

You are not in the Godot’s Discord Server ? someone helped me for that in DC, just increased the pixel margin of One way collision by some pixels and it worked

No, and it doesn’t even tell me what channel this is on, just randomly opens whatever channel when I click on the link.
Glad you were able to solve your issue though.

1 Like

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.