Skip to main content

ICollision2DMethods

Trait ICollision2DMethods 

Source
pub trait ICollision2DMethods: ICollision2D {
    // Provided methods
    fn get_collider(self) -> Collider2D { ... }
    fn get_rigidbody(self) -> Rigidbody2D { ... }
    fn get_game_object(self) -> GameObject { ... }
    fn get_relative_velocity(self) -> Vector2 { ... }
}

Provided Methods§

Source

fn get_collider(self) -> Collider2D

get_collider() overload

Source

fn get_rigidbody(self) -> Rigidbody2D

get_rigidbody() overload

Source

fn get_game_object(self) -> GameObject

get_gameObject() overload

Source

fn get_relative_velocity(self) -> Vector2

get_relativeVelocity() overload

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§

Source§

impl<__T: ICollision2D> ICollision2DMethods for __T

Available on crate feature unity_engine-collision2d only.