Thoughtful Musings of Features


#1

Wanted to get away from the bug reporting and onto some of the blue-sky things I’ve wanted to do, quite willing to help with too. If any developer or PM can speak to these I’d much appreciate it:

Ability to determine if an avatar is speaking
This could be an avatar property or method to get a Boolean or it could be a script event that when triggered indicates which avatar speaking state changed and if the avatar has started or ended speaking. This one is quite useful for entities that may wish to gaze upon the speaking avatar. One good example is a camera entity. Would be a great way to automate recording meetings.

Planar and radial local gravity fields
Permits things like space ships, space stations. This implies stiction on the objects or avatars standing/placed upon the vehicle entity so that when it moves, so will the items placed upon it. Also needed is avatar auto orientation to the local vertical of the gravity field. A similar auto orientation property would be needed for entities (aka vertical attractor).

Communicate with scripts of an entity
I have many uses for this, though the one example I like to give is a flocking behavior in virtual birds. There is findEntities(…) so that one entity can locate nearby ones then get properties like position and velocity to perform action adjustments based on nearest neighbors.

But for more interesting behaviors I do not see a method to post an event to scripts belonging to an entity, nor a send message method. Something like:

var ent; // assume this references the target entity
var event_type = "myspecialevent";
ent.PostEventToScripts(ent, event_type, event_parameter);

I could do this by scribbling into the user data property of an entity and though I see getEntityProperties() I do not see in the docs a setEntityProperties (or, for that matter, a getEntityProperty). At least the script could poll for messages in its related entity user data ‘dropbox’.


#2

Well, we already have a means to setting “gravity” to entities, such that an av that is right above it drops down onto it. But yeah, the idea of something where you can place objects inside something and have them move with the object, i.e. furniture rezzed inside a replica of USS Voyager, that then starts falling over if the ship takes hard maneuvers, or where books get flung off the shelves aboard the ship, is a neat one to have. We DO have objects that land on other objects and can be knocked around and pushed around, so I guess we’re largely already there. :smiley:


#3

We can currently utilize all bold letter items in your post.
Main problem is lack of docs. Let’s address in order,

  1. Find the setting to make avatar glow when speaking. It’s in the toolbar unless it was recently removed.

  2. Gravity can be isolated just like skybox entities and attenuation via zones. Check your stack manager settings for creating separate zones.

  3. Entities currently hold a user properties variable that is exposed in the edit panel. You might be able to leverage this as most things with user input, can also be manipulated via script and vice versa.

Try them out! Your mileage may vary.


#4

Yep, the communication of scripts and entities is an topic id also like to see addressed: but it would cool to have a messaging layer on the stack manager level to do so. Was discussing this earlier.
While the reading and writing of “userProperties” field is a form of communication, I dont think its good to have scripts proactively constantly scanning for changes. Instead it should be “till update” do. sorta way.


#5

Very much agree on that one which is why I was asking for some kind of event system. Polling at the script level can be pricey. JavaScript has a event system, we just need the plumbing to signal events, but it is a kind of proxy service in that you want to signal the scripts associated with an entity.