How do I add a Pivot?

#1
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 it would do what I need it to but I haven't been able to figure out how to add a pivot to my door. Can someone point me in the right direction? Thanks!

Re: How do I add a Pivot?

#2
https://github.com/CRYTEK/CRYENGINE/blo ... entity.cpp

line972

Code: Select all

if (action->bRotationAroundPivot && (m_body.pos-m_pos).len2()>sqr(m_pWorld->m_vars.maxContactGap)) { status->centerOfMass int bRotationAroundPivot; //!< if set, w is rotation around the entity's pivot, otherwise around its center of mass


there is another way around . add parent entity ,attach to parent,move child to pivot. rotate parent instead.


or in 3dmax , change pivot is easy to go.

Re: How do I add a Pivot?

#3
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 1 and bam! the door rotated properly! So I guess a pivot in CryEngine is simply the origin in model space? Or is this 3d studio max terminology?

Who is online

Users browsing this forum: No registered users and 2 guests