[SOLVED] Create entity by script

Good morning everyone!

I try to create a new entity by script.

var playerMovePoint = new pc.Entity();

But instead of using this (what I expect with an entity):


I need to use this (what I expect with a vector 3):


This gives me the idea that it is not going well (and because of that I can’t get something else done).

This is correct if playerMovePoint is an Entity. My bet is that it has been assigned to be a Vec3 after that point.

Search for playerMovePoint = and see if it had been assigned a Vec3 at any point.

Yes, that was the cause. Thanks!

(My idea still doesn’t work so I have to look further for an alternative).

Succeeded! :smile: