Camera Collision in BGE




Camera Collision in Blender Game Engine, this is not intended to be a tutorial on a 3rd person camera, but this i used for the demonstration of applying collision to such a camera, I WILL RELEASE A TUTORIAL ON A MORE ADVANCED 3RD PERSON CAMERA, that being said, enjoy… 🙂

First Person Template: https://drive.google.com/file/d/0B9SMh1EBaTriTXpNcVNKbDVjUnc/view?usp=sharing&resourcekey=0-7ImdhYzFAZb9A7qXSTSQdA

How to make the fps template: https://www.youtube.com/watch?v=PgH9bNh9ntA

Feel free to ask me any questions in the comments section!

Script:

import bge
cont = bge.logic.getCurrentController()
own = cont.owner

scene = bge.logic.getCurrentScene()
empty = scene.objects[« empty »]
reset = scene.objects[« reset »]

ray = cont.sensors[« ray »]

if ray.positive:
empty.worldPosition = ray.hitPosition
else:
empty.worldPosition = reset.worldPosition

Voir sur youtube

KA2Studio
Logo
Compare items
  • Total (0)
Compare
0