Search found 25 matches

Re: Making a door hinge

Ohhh man you are using a point constraint not a line constraint! Holy crap it finally works!!! This is the code that ended up doing the trick for me! Matrix34 entityTM = m_pEntity->GetWorldTM(); IPhysicalEntity *pPE = m_pEntity->GetPhysics(); pe_action_add_constraint ac; Vec3 axis(0, 0, 1); ac.flags...

Re: Making a door hinge

So if I want a swinging door that has a hinge along the (world) Z axis, Then using the code previously posted on my component, I would rotate my entity in the editor by 90 degrees on the Y axis then rotate the mesh component on the Y axis (to make the door stand up right) by -90 degrees? Is that wha...

Re: Making a door hinge

Sorry for the delay, I had to travel for work. I tried initializing qframe[0] and qframe[1] as LineConstraint did but I still must have something messed up. My code looks like this now: Matrix34 entityTM = m_pEntity->GetWorldTM(); IPhysicalEntity *pPE = m_pEntity->GetPhysics(); pe_action_add_constra...

Re: Making a door hinge

I've been referencing that file but I am still struggling to get it to work properly. I have two cases that work but both have flaws. I don't know where I am going wrong. First The problem with this is that if I push on the door from the side, the "hinge" at the top moves and the door is no longer s...

Re: Making a door hinge

This is the code I have come up with so far: Matrix34 entityTM = m_pEntity->GetWorldTM(); IPhysicalEntity *pPE = m_pEntity->GetPhysics(); pe_action_add_constraint ac; ac.flags = world_frames | constraint_no_tears; ac.pBuddy = WORLD_ENTITY; ac.xlimits[0] = 1.0f; ac.xlimits[1] = 0.0f; ac.pt[0] = ac.pt...

Making a door hinge

I am working making a door, I have it so that if I walk up to the door and click, it opens(yay!). The problem now is that if I push the door without opening it, the door can fall over. How can I "pin" the door such that it's position is locked and the axis which the door can rotate is restricted to ...

Re: How do I add a Pivot?

I guess I was over thinking this. I thought a pivot was a point something I would add or define in the map or the model. Even if I had 3d studio max I had no idea what needed to be done. I eventually tried moving the origin of the model in Ultimate Unwrap 3d and set the bRotationAroundPivot flag to ...

How do I add a Pivot?

I have an entity with a rigid body component that is to be a door. I am applying velocity to turn the door, it all works great except that it is rotating on center of mass so it just turns in the middle of the model. I found the bRotationAroundPivot member of pe_action_set_velocity which seems like ...

Go to advanced search

cron