schizi
(schizi)
June 15, 2020, 12:35pm
#1
Hello,
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.
Wrong:
https://streamable.com/rt14oi
Correct:
External Media
Don’t know how to handle this?
1 Like
AdaptabiI
(Adaptabil)
June 15, 2020, 12:40pm
#2
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?
2 Likes
schizi
(schizi)
June 15, 2020, 1:01pm
#3
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 ()?
1 Like
AdaptabiI
(Adaptabil)
June 15, 2020, 1:09pm
#4
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?)
schizi
(schizi)
June 15, 2020, 1:17pm
#5
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.
AdaptabiI
(Adaptabil)
June 15, 2020, 1:20pm
#6
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.
schizi
(schizi)
June 15, 2020, 1:47pm
#7
How to simulate:
create new game - obby type
play
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.