Skip to content

rigidbody2d bounce c# example incorrect method #7541

@prashantham

Description

@prashantham

Your Godot version:
4.0.3

Issue description:
The collision bounce method uses
_velocity = _velocity.Bounce(collisionInfo.Normal);

But there is no Normal field, but a GetNormal() method;
Hence example should have been
_velocity = _velocity.Bounce(collisionInfo.GetNormal());

URL to the documentation page:
https://docs.godotengine.org/en/stable/tutorials/physics/physics_introduction.html#rigidbody2d

If you know how to fix the issue you are reporting please
consider opening a pull request. We provide a tutorial on
using git here: https://docs.godotengine.org/en/stable/community/contributing/pr_workflow.html,
writing documentation at https://docs.godotengine.org/en/stable/community/contributing/docs_writing_guidelines.html
and contributing to the class reference here: https://docs.godotengine.org/en/stable/community/contributing/updating_the_class_reference.html

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions