Moving parented camera with collisions

Blitz3D Forums/Blitz3D Beginners Area/Moving parented camera with collisions

The forum is locked. These are the original blitzbasic.com forums, kept so they can still be read. No new topics, replies or edits can be made here. To join in, head over to the Blitz3D+ forums.

Hey, there is no need to create a sphere to represent the camera's collision.

The reason it is not working as far as i can see, is the camera has no collisions assigned to it. You are parenting the camera to a sphere that has collisions on it, apart from collisions with the camera_sphere. Setting the camera_sphere to collide with the camera isn't going to work for two reasons.

1. The camera is inside the camera sphere and collisions cannot occur when this happens.

2. The camera is parented to the camera_sphere, so they will never actually collide.

So what you really need to do is get rid of the collision_sphere and all colisions between it. Now set up collisions between the actual camera and the level.

EntityRadius camera,2


Set the camera collision radius to 2 units. This will create an invisible sphere around the camera which is used for collisions.

EntityType camera,type_camera


Give the camera the collisiontype you assigned at the top of the program

Collisions type_camera,type_scenery,2,3


Set up your collisions. I see you've already done that now. Well, try that out anyway. You don't have any need for the whole collision shpere thing. :) Hope this helps!