Welcome, Guest. Please login or register. Did you miss your activation email?

Author Topic: Raycast failed  (Read 215 times)

0 Members and 1 Guest are viewing this topic.

R4nd0mP3rSon

  • Newbie
  • *
  • Posts: 15
    • View Profile
Raycast failed
« on: April 12, 2024, 02:36:41 pm »
How do I fixed this https://pastebin.com/8qTAdy95 the code worked fine if I  put      float shape_height = round(1000.f* projection  /rad);        but when I put           float shape_height = round(1000.f* projection  /(rad * dist));    like from this video   it worked  for horizontal  but  not for vertical for some reason




basically the height is a it too tall
« Last Edit: April 12, 2024, 03:39:39 pm by R4nd0mP3rSon »

Junior_Zephyr

  • Newbie
  • *
  • Posts: 1
    • View Profile
    • Email
Re: Raycast failed
« Reply #1 on: April 21, 2024, 05:54:20 pm »
Just get better, just kidding i really don't understand either because i haven't learn this just yet.

eXpl0it3r

  • SFML Team
  • Hero Member
  • *****
  • Posts: 10835
    • View Profile
    • development blog
    • Email
Re: Raycast failed
« Reply #2 on: April 22, 2024, 08:28:40 am »
You need to provide more information if you want help.

People won't go watch a full YouTube video, just to understand what's going.

Use a debugger to understand how values change and make sure you understand what should be happening, so you can check if the values are correct and wrong.
Official FAQ: https://www.sfml-dev.org/faq.php
Official Discord Server: https://discord.gg/nr4X7Fh
——————————————————————
Dev Blog: https://duerrenberger.dev/blog/