Skip to content
This repository has been archived by the owner on Nov 29, 2022. It is now read-only.

How to make player stop when colliding with object? #222

Answered by jcornaz
mattoni asked this question in Q&A
Discussion options

You must be logged in to vote

Updating the transform as you do, is teleporting the object each frame, ignoring all physics rules.

If you want a more realistic behavior (like not passing through other objects :-p) then it's more appropriate to use the velocity component.

See: https://docs.rs/heron/latest/heron/#move-rigid-bodies-programmatically

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@mattoni
Comment options

@mattoni
Comment options

Answer selected by jcornaz
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants
Converted from issue

This discussion was converted from issue #221 on March 09, 2022 08:20.