Hey, is it possible to move a Player with camera from one scene to another
I wanna make the player spawn, so i tried have him in layer 2, and at the start of the game the character will move to layer one. and everything that is parented to that object follows it to layer one.
But the problem is that the camera for some reason doesnt stay parented, it goes to layer one, but it always stops at the location where it spawned…
I even tried to change camera to that camera again after 1 sec. but the camera is sill in the same locations as when it where moved…
Is it impossible to to move a camera from another layer or what??
Cameras are tricky like that. The best way to do it is to have the camera always be on Layer 1, and parent it to the player in-game when the player spawns in.
i tried that but, then the camrea swaps in to layer 2 while the player swaps in to layer 1…
You would probably have to use Python to define the active camera in the scene. That way, any object can have a camera and Python can switch to it regardless of where it is.
A word of warning: if you delete the current camera that the player is using then Blender will crash!
ill just try to set the view to another camera when the player dies and resets it to defaulkt when it respawns
how do you spawn the player? using addObject? if so that is why the camera wont move, the added object won’t be the actual object, but rather an copy of it. So the original object won’t be affected by the movements of the newly created one. To solve this, add an object and use python to set the cameras location/parent to the nevly added object after it is created.
Sigh, addObject (python or actuator) adds a copy of the object from another layer; including all child objects in relation to the main object (so parenting the camera to the player setup keeps it with the player). Select the camera, shift-click to select the player, press ctrl+p to parent.