The Godot Community Forums are back up and running! Please read the the announcement post for important information on what happened. Thanks!

what is the right way to project ray from screen point

I'm sorry for my poor english. but I really need some help.
i want to implement a features, that when i click on screen , then a ray cast from click point,if thier hit something a sphere will add to the hit position.But i messed it up and thier is my trying project. what's wrong with me

https://drive.google.com/file/d/1NGWoovwW7B1bg_pxuojlvRGqh7bigpar/view?usp=sharing

Comments

  • TwistedTwiglegTwistedTwigleg Posts: 3,129Admin

    Welcome to the forums @ning_drift!
    If you haven't seen it already, I would recommend looking at the Godot documentation for raycasting. That said, I'll try to look at the project later today and see if I can figure out what is going on.


    This discussion was caught in the moderation queue since you have not confirmed your account yet.

    Upon creating your account you should have received an account verification email. The confirmation email may have been incorrectly flagged as spam, so please also check your spam filter. Without confirming your account, future posts may also be caught in the moderation queue. You can resend a confirmation email when you log into your account if you cannot find the first verification email.

    If you need any help, please let us know! You can find ways to contact forum staff on the Contact page. Thanks! :smile:

  • @>; @TwistedTwigleg said:

    Welcome to the forums @ning_drift!
    If you haven't seen it already, I would recommend looking at the Godot documentation for raycasting. That said, I'll try to look at the project later today and see if I can figure out what is going on.


    This discussion was caught in the moderation queue since you have not confirmed your account yet.

    Upon creating your account you should have received an account verification email. The confirmation email may have been incorrectly flagged as spam, so please also check your spam filter. Without confirming your account, future posts may also be caught in the moderation queue. You can resend a confirmation email when you log into your account if you cannot find the first verification email.

    If you need any help, please let us know! You can find ways to contact forum staff on the Contact page. Thanks! :smile:

    Thank you so much for your welcome and verification reminders.I verified the email address a few minutes ago.And this question i find the reason, that because of i reversed the ray_normal and ray_origin variable(which get from camera.project_xxx). :#

Leave a Comment

BoldItalicStrikethroughOrdered listUnordered list
Emoji
Image
Align leftAlign centerAlign rightToggle HTML viewToggle full pageToggle lights
Drop image/file