Need help with Dynamic Properties for Interactive models


#1

Hi, I haven’t been able to find much documentation on the dynamics properties for Model entities.

We are trying to create a couple simple interactive games, such as Basketball, pool and darts. Everything is set up except for getting the right dynamic properties on our models.

The Basketball is Dynamic, and works well with our Basketball hoop, but it doesn’t bounce, it just hits the floor and rolls.

My questions are, how can I get the Basketball to bounce realistically?

The darts are working, but they do not stick to the wall or the dartboard, is there a way to make them stick into where you throw them?

Lastly, how can we set it so that Dynamic objects if they havent been moved in 30 seconds return to the orginal position?

Thank you for your time, I would really appreciate any help or links to the detailed definition of the Dynamic Property Attributes in High Fidelity.

Thanks!


#2

To make something behave a bit differently that the defaults, it needs to be under the influence of a Physical Constraint either via script or Physics actions (think of them like constraints).


For bouncing, there currently is no Physics Actions available, so instead the behavior has to be simulated via script:

Such as with this Super Ball item,

Which has

http://mpassets.highfidelity.com/d2113a86-3526-414d-879b-3d9025ccb607-v1/superBall_Entity.js
Entity script added to the item.


For the darts, you have to use the same technique as the super ball, but instead of bouncing on collision, it should disable it physics to stick to the object. Similar actions can be found when you fire the arrows with the shortbow, from the shortbow game. You can even parent the arrows to what ever they collide with, to allow for the arrows to stick with the objects they strike (even other avatars)


For the return to entity home, youll have to do it via script, but note that all entity scripts are local scripts (scripts run on every connected user): Instead you would want to have a entity server script that manages the state of the objects, and returns them, if the objects have not moved for a while.


#3

Thank you Menithal, I will check that out!

Do you know of an online reference that has definitions of the Dynamics options for a Model Entity in HF? I couldnt find any info on Dampening, or explanations for the rest of the options in the Dynamic properties.

Thanks!


#4

Unfortunately the documentation is a bit lacking,

https://docs.highfidelity.com/create-and-explore/entities/entity-properties

Rule of thumb however is that the words describe what they do:

Dampening forexample, could be considered as friction, as per dictionary

to check or retard the energy, action, etc., of; deaden; dampen:

Linear Dampening: Think of it like How well something slides across a surface
Angular Dampening: Think of it like how well something rolls (like a fidget spinner)


#5

Thank you Menithal!!