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

Subobject focus an other object, doesn't works properly if parent is rotating #1

Closed
Inateno opened this issue Jan 26, 2019 · 1 comment
Labels
bug Something isn't working

Comments

@Inateno
Copy link
Contributor

Inateno commented Jan 26, 2019

If a sub-object try to focus an other object and while his parent is turning, this break the focus.
Here is a snippet to try

var parent = new DE.GameObject( {
  x: 300, y: 300,
  gameObjects: [
    new DE.GameObject( { name: 'sub' } )
  ]
} );

var toFocus = new DE.GameObject( { x: 0, y: 0 } );

parent.gameObjects[0].focus( toFocus ); // focus the toFocus object

// add a rotate to the parent object, now the object 'sub' isn't at the good position !
parent.addAutomatism("rotate", "rotate", { value1: 0.002 });
@Inateno
Copy link
Contributor Author

Inateno commented Sep 23, 2019

fixed in bea4d1a
Tested by adding Game.ship.gameObjects[ 0 ].focus( Game.targetPointer ) to the end of the Game.js in the game_sample repos.

@Inateno Inateno added the bug Something isn't working label Sep 23, 2019
@Inateno Inateno closed this as completed Sep 23, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant