Skip to content

Conversation

@toafloast
Copy link
Contributor

Fixed this error :
image

It's still lacking a C# code example, but I don't know C#. Could a C# user please write one?
I decided to replaced the old false-positive example image, let me know if I need to change anything.
I've also made the last code examples a little more generic, replacing 'enemy_position' with 'target_position'.

@AThousandShips
Copy link
Member

Thank you for your contribution!

Please convert the image to the .webp format.
you can read more about it in the Doc image guidelines

@AThousandShips AThousandShips added enhancement area:manual Issues and PRs related to the Manual/Tutorials section of the documentation labels Aug 17, 2023
@AThousandShips
Copy link
Member

Can you please squash your commits into one, see here

Fixed a code-tab in the Ray-casting tutorial.
It's also lacking a C# example, but I don't know how to write C#.
@aaronfranke
Copy link
Member

Old image:

raycast_falsepositive

New image:

raycast_falsepositive

func _physics_process(delta):
var space_state = get_world_2d().direct_space_state
var query = PhysicsRayQueryParameters2D.create(global_position, enemy_position)
var query = PhysicsRayQueryParameters2D.create(global_position, player_position)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What's the reason for using player_position here but target_position below?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the tutorial provides a specific-use case example (enemy & player), so i thought it would be a good idea to use more 'generalized' wording there to hint at other use-cases outside of those situations.

@AThousandShips
Copy link
Member

Please use rebase to update your branch, see here, it avoids having to squash again and keeps cleaner history

@toafloast
Copy link
Contributor Author

Please use rebase to update your branch, see here, it avoids having to squash again and keeps cleaner history

Im not really sure how to do that. I've tried doing this :
p ba665d9
s 5c4528b
s c1ed35e

but it throws an error and I have no clue how to fix it. I don't want to accidentally nuke everything.

@toafloast
Copy link
Contributor Author

toafloast commented Sep 22, 2023

I think it would be easier for me to make a new PR, ive put it here
#7997

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

archived area:manual Issues and PRs related to the Manual/Tutorials section of the documentation enhancement

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants