2d platformer weapon assistance

  1. I am attempting to make a gun/weapon with no raycasting for a 2d platformer

  2. Raycasting creates a line from your weapon to your cursor position which isn’t ideal for a 2d platformer
    raycasting


    No raycasting

  3. unfortanely I couldnt find anything on how make to create a gun without raycasting.

Thanks! ~ laughs

You could modify a normal weapon so that its raycast’s start and end positions are flattened into the plane of your 2D game. So if your game exists in the X = 0 plane then you would set the X component of both to 0

Thank you for the replie, I’ll try this soon :upside_down_face: