June 15, 2020, 12:35pm
I spent the whole morning looking for a way to solve the camera problem after the character’s death.
When a character dies, the camera appears randomly - once a rear view (correctly) and once a front view.
Don’t know how to handle this?
June 15, 2020, 12:40pm
Are you using a custom camera? If so, you want to use :toObjectSpace() when setting the camera’s CFrame
The wiki has a very limited explanation on this topic, I don’t think its even a sentence, so i was wondering if any of you knew what these functions were, and how they work?
I already have some post about “Relative to Object/Part” or still “Relative to the World”, but I don’t understand it. The only thing I know is that they have something to do with the functions CFrame:ToWorldSpace() and CFrame:ToObjectSpace(). I already read about CFrame in the article, but didn’t understand it. Can anyone help me?
June 15, 2020, 1:01pm
Yes, this is a custom camera by default, when you run game. As far as I know, I do not set the camera or its type anywhere. I feel that this is the basic behavior of the game.
Where should I set up the camp? When is a character revived? And there use: ToObjectSpace ()?
June 15, 2020, 1:09pm
If it’s a custom camera, then it should be constantly updated, and yes use toobjectspace while you’re constantly updating the camera.
Also, why do you need a custom camera and why can’t you use the default roblox camera? (What are you trying to achieve with the custom camera?)
June 15, 2020, 1:17pm
I think Custom is the default setting when creating new game. I didn’t change the type of camera anywhere.
I tried this:
print (game.Workspace.CurrentCamera.CameraType) = return " Enum.CameraType.Custom" to me.
June 15, 2020, 1:20pm
Oh so the camera freezes in place for you? Also you can check if anywhere any code changes the cameratype.
press CTRL + F or use the find tool in script and do find all, type in Enum.CameraType.Custom and see if it comes up with anything.
June 15, 2020, 1:47pm
How to simulate:
create new game - obby type
go to next checkpoint
jump down and die
player revive on last chcekpoint
And there is strange behavior - after revive, camera is not directly behind player, but looking from side or front to back of player.