Camera Switch

Blitz3D Forums/Blitz3D Programming/Camera Switch

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.

And using EntityParent and PositionEntity, etc. EVERY FRAME could be very slow.

I may not understand you, but I don't see why you need to perform those checks every frame. Just perform them the first time you hit spacebar, like this:
If KeyHit(57) and cam_mode = 1
	cam_mode = 2
	EntityParent camera, car\entity
	PositionEntity camera, EntityX(car\entity), EntityY(car\entity)+30, EntityZ(car\entity)-10
	RotateEntity camera, EntityPitch(car\entity)+45, EntityYaw(car\entity), EntityPitch(car\entity)
EndIf

And then take these lines:
	EntityParent camera, car\entity
	PositionEntity camera, EntityX(car\entity), EntityY(car\entity)+30, EntityZ(car\entity)-10
	RotateEntity camera, EntityPitch(car\entity)+45, EntityYaw(car\entity), EntityPitch(car\entity)
out of the bit of code you posted at the top of this thread.