How do Put Model Gun front of the Camera?
Blitz3D Forums/Blitz3D Beginners Area/How do Put Model Gun front of the Camera?
| ||
Hiya all, I just dont know how to do it. My thought is Put the camera first put the Model gun front of the camera connect the gun with camera mouselook does anyone have small code example on what I am trying to achive. |
| ||
You can parent the camera to the gunEntityParent camera,gun |
| ||
If you don't want the gun poking through walls, etc, then it's better to create a second camera and parent the gun to that. The thread linked below has some discussion on the subject. http://www.blitzbasic.com/Community/posts.php?topic=75471#843400 |
| ||
If it's an FPS then EntityOrder() should suffice. |
| ||
Using EntityOrder() on the gun will cause the gun's polygons to not be z ordered. |
| ||
That made me scratch my head because I've done the EntityOrder() thing previously without any problems -- when I look at that (old) project, though, I notice that the gun has been modelled in such a way that the issue will never arise. So I'll qualify my previous statement that EntityOrder() should suffice by adding if your artist has done his job! Interestingly, in the end, I hadn't gone with EntityOrder() on that occasion (it was commented out) -- instead I had scaled the gun right down and placed it as close to the camera as the camera-range allowed without it clipping out of view. Works a treat. |