Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Omni objects and theta placement #6

Open
bsingh-UW opened this issue Mar 18, 2020 · 0 comments
Open

Omni objects and theta placement #6

bsingh-UW opened this issue Mar 18, 2020 · 0 comments

Comments

@bsingh-UW
Copy link

bsingh-UW commented Mar 18, 2020

Omni agents seem to not be responsive to angle placements via the config.json. For instance, placing an omni object in its initial position will apply the "x" and "y" placement, but its angle or "theta" will always be zero. For instance, the following script in my config.json:

{
            "definition": "defs/ball.json",
            "style": {
                "fill": "blue",
                "stroke": "blue",
                "strokeWidth": "2px",
                "strokeOpacity": "0.25"
            },
            "position": {
                "x": 50,
                "y": 100,
                "theta": 0.785
            }
}

Will place the "ball" at 50,100 but it will have an angle of 0 regardless.

Currently working around this by manually teleportation the object to its start position on the init{} call for that object,

teleport(x(), y(), angle() + PI/4);

Code above rotates it by 45 degrees. I guess this might be default behaviour but just noting it in case it wasn't.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant