[SOLVED] Issues with translating entities, need some assistance

so my code is this.entity.translateLocal(0.1,-0.1,0.5);
the entity attached to this code translates by - 0.1(left) instead of 0.1(right) on the x axes, translates 0.1(up) instead of -0.1(down) on the y axes, and translates by -0.5(forward) instead of 0.5(towards me) in zed axes in the editor. my local axes seem to be correct but I still cant get my entity moving in the right direction.
the rotation of the camera is (0,0,0)
thanks

Can you post a link to a scene that illustrates the problem please?

Seems like the parent of your entity has (-1, -1, -1) scale?

No, the parent entity is the root entity and it’s scale is (1, 1, 1)

https://playcanvas.com/editor/scene/427589

You’ve put your move.js script on the floor box and not the ‘Moving Box’ entity. Was that intentional?

No it wasn’t. I intended for the moving box to move only.

hmmm…interesting. from the looks of it, having the move.js script attached to the floor box still made moving box move but in the wrong directions. any idea why this might have been?

thanks

I see you’ve moved the move.js script from the ‘floor’ entity (‘Box’) to the ‘Moving Box’ entity. The scene now appears to do what you want. So is everything A-OK? :smile:

Yes :smile:
thank you