Hook Cam Pivot on Rigged Bone?
Blitz3D Forums/Blitz3D Programming/Hook Cam Pivot on Rigged Bone?
| ||
I would like to know if this is easy as attaching a cam and pivot to a rigged B3d model bone and control the rotation (ie hips, neck) or there are extra steps and what are they? Thanks. |
| ||
Yes, you can use the command child = findchild(entity,childname$) Then entityparent(camera,child,true) |
| ||
Thanks RemiD, so do I have full control like sort of a ragdoll thing once I got the child bone and attach it to my cam pivot? Also, I'm sure you have encountered this question before, so how do you limit turning the pivot to a certain angle, particularly when you attached a mouse cam on it? |
| ||
You can rotate the joint/bone as you want after updateworld() But if you only want the camera to follow the animation of an animated mesh (animated joints/bones) you can either set the camera as a child of a joint/bone or position rotate the camera like the joint/bone after it has been updated. To limit the rotation of a pivot/entity you simply check if its current pitch,yaw,roll (local) is inferior/superior to the pitch,yaw,roll (local) you want. See an example here : http://www.blitzbasic.com/codearcs/codearcs.php?code=2933 |
| ||
Make sure you rotate bones after calling updateworld otherwise any animations will override the rotations you apply. |