pull/3/head
Alex 2024-02-05 15:39:57 +01:00
parent bfd691e7ab
commit df76bb5f35
1 changed files with 4 additions and 2 deletions

View File

@ -30,8 +30,10 @@ export function Banana({onCollide, id, ...props}) {
type='fixed' type='fixed'
position={props.position} position={props.position}
sensor sensor
onIntersectionEnter={() => { onIntersectionEnter={({other}) => {
if(other.rigidBodyObject.name === "player"){
actions.setShouldSlowDown(true); actions.setShouldSlowDown(true);
}
actions.removeBananaById(id); actions.removeBananaById(id);
}} }}
colliders={false} colliders={false}