I would like to set the position of an object in behavior property. so when created it will be created in it’s property location,
When I try to set the position of the x object in the “OnCreated” function it is not working. why?
Are you using the create object action to create it? Because there are position parameters.
The object is already on the scene.
The “OnCreated” is running when the scene is loaded but I cannot change the position of the object.
I can change it’s size color direction but not position
The wiki says: onCreated : events inside the function will be run when a new instance of an object with the behavior is created.
So I’m not sure it works if the instance already exists on the scene…
On a side note, for some reason, when I create an instance in the events, there are some properties that cannot be edited in the same event block, and the position is one of them.
Perhaps this is related.
This is exactly my problem maybe a bug?
Any news about this question?
I would like to set the position of an object on the onCreated function. but it is not seams to work.
Have you tried moving the position action to a sub-block or another block?
yes. nothing happens
I also want to create a new object from behavior. nothing
I’m not sure you can create an object through an object behavior. The behavior cannot apply if the object doesn’t exist, I suppose…It sounds logical, anyway.
You should use functions for that, no?