Quick question about translateLocal()

can translateLocal() be included in a variable?example:
var movement = this.entity.translateLocal(0,-0.1,0)

Hi @vilothaine_2,

Well, this specific method doesn’t return any value/reference to store in a variable. Your code will execute with no error but the movement variable will be null.

What are you trying to do? To get the new local position of the entity you can do this:

var localPos = this.entity.getLocalPosition();


1 Like

I know emkay. I’ve watched his videos before.

1 Like