SimApi Physics GetActorEntityNameAndId 2

From SIMboxWiki
Jump to navigation Jump to search

Icon attributes.pngstatic bool SimApi::Physics::GetActorEntityNameAndId(const NxActor *i_pActor, string &o_EntityName, int &o_EntityId)


    Returns the simulation entity name and entity ID that the PhysX actor is related to, using non-unicode strings


    i_pActor - a pointer to the PhysX actor the data is requested for
    o_EntityName - The simulation entity name the actor is related to
    o_EntityId - The simulation entity id the actor is related to


    Type: bool   Description: true if the actor has entity name and entity id data, false if not


    Code Sample

NxActor* pHummerWheel01 = SimApi::Physics::GetActorFromEntity(L"Hummer 1",L"wheel01");
if (pHummerWheel01 != NULL){
	pHummerWheel01->setMass(100.0f); // sets the mass to 100Kg
	string entityName;
	int entityId(-1);

    See Also

    SimApi Physics