Skip to content

Box2D go to x y relative does not work? #935

@DNin01

Description

@DNin01

If I'm understanding correctly, this block basically acts like the change x/y blocks. What's happening is I'm trying to move the sprite to the right 100 steps but it's doing very strange things. I think what's happening is it's trying to add to the x position when setting both the x and y, so if x is -100 the sprite will end up trying to move relative to x: -100 and y: -100.

Try this code to see what I mean:

go to x: (-100) y: (100) [in world v] :: box2d
wait (2) seconds
go to x: (0) y: (0) [relative v] :: box2d
wait (2) seconds
repeat (4) {
  go to x: (50) y: (0) [relative v] :: box2d
  wait (1) seconds
}

I could just use change x/y but it fences the sprite.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions