Parenting

Blitz3D Forums/Blitz3D Beginners Area/Parenting

Dicon(Posted 2011) [#1]
How do I "parent" a camera to follow a character, so that is always looking over the characters head?

Thanks for being here to answer the questions.

Dicon


Yasha(Posted 2011) [#2]
The EntityParent command attaches an entity to a parent, which is useful if it has an independent existence spanning several characters. Otherwise, when it's created, you can supply the parent entity as a parameter.

Parenting however is a "hard" relationship: every movement the character makes will immediately and completely affect the camera. It's a good choice for shooter games that require very precise camera controls, but not so much for platformers, because it will seem very rough. For smoother camera movement, there are some good examples in the code archives (revolving around the principle of moving the camera towards the desired position by a given proportion each frame).


stayne(Posted 2011) [#3]
Try this...

http://blitzbasic.com/codearcs/codearcs.php?code=1083

Just raise the Y offset to your liking.