GetEntityAttribute()
Syntax
Result = GetEntityAttribute(#Entity, Attribute)Description
Get the specified attribute of the given entity.
Parameters
#Entity The entity to use. Attribute The attribute to get. The following attributes are available: #PB_Entity_Friction : Get the friction value. #PB_Entity_Restitution : Get the restitution value. #PB_Entity_LinearVelocity : Get the current linear velocity (all axis). #PB_Entity_LinearVelocityX : Get the current linear velocity on 'x' axis. #PB_Entity_LinearVelocityY : Get the current linear velocity on 'y' axis. #PB_Entity_LinearVelocityZ : Get the current linear velocity on 'z' axis. #PB_Entity_MassCenterX : Get the mass center 'x' position. #PB_Entity_MassCenterY : Get the mass center 'y' position. #PB_Entity_MassCenterZ : Get the mass center 'z' position. #PB_Entity_NbSubEntities : Get the number of sub-entities. #PB_Entity_LinearSleeping : Get the minimum linear velocity value under which the entity will be sleeping. #PB_Entity_AngularSleeping : Get the minimum angular velocity value under which the entity will be sleeping. #PB_Entity_DeactivationTime: Get the time to wait (in milliseconds) before putting the entity in sleep mode when the above conditions are met. #PB_Entity_IsActive : Get if an entity body is active (not sleeping). #PB_Entity_AngularVelocityX: Get the current angular velocity on 'x' axis. #PB_Entity_AngularVelocityY: Get the current angular velocity on 'y' axis. #PB_Entity_AngularVelocityZ: Get the current angular velocity on 'z' axis. #PB_Entity_AngularVelocity : Get the current angular velocity (all axis). #PB_Entity_HasContactResponse: Check if the entity body has contacts. #PB_Entity_ScaleX : Get the current entity scale on 'x' axis. #PB_Entity_ScaleY : Get the current entity scale on 'y' axis. #PB_Entity_ScaleZ : Get the current entity scale on 'z' axis.
Return value
Returns the value of the specified attribute or 0 if the entity does not support the attribute.
See Also
SetEntityAttribute()
Supported OS
All