Hook Cam Pivot on Rigged Bone?

Blitz3D Forums/Blitz3D Programming/Hook Cam Pivot on Rigged Bone?

RustyKristi(Posted 2016) [#1]
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.


RemiD(Posted 2016) [#2]
Yes, you can use the command child = findchild(entity,childname$)
Then entityparent(camera,child,true)


RustyKristi(Posted 2016) [#3]
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?


RemiD(Posted 2016) [#4]
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


Matty(Posted 2016) [#5]
Make sure you rotate bones after calling updateworld otherwise any animations will override the rotations you apply.