So. I was making a camera set-up for my game “Starlit”, and I manage to have a pretty decent camera. So without further or do. Here’s the features.
Features:
>Mouse-controlled (via the mouse look script) *with no limits
>A decent Minimap.
>Freeview
>Camera Scrolling
>Simple Dialog System
But it’s not as perfect as it seems. I has some minor issues:
>The player is slightly twitching when rotating.
>The Minimap only works at the given camera size.
>It has no camera collision.
>No Suspend scene when having dialog.
Here you go. If you ever find this useful. Or if ever this helps your camera set up. A simple thank you is enough.
Dialog Instructions:
Go to the small cube.
Press spacebar when near it.
Press spacebar again to go to the next page.
PS: It is not entirely mine. I just made a decent camera set up for my game and wanted to share it.
Well, I like it. Which pieces are from other people?
I did notice a couple of issues, and also made a few changes to make it easier for me to see what was going on.
The left/right strafe was reversed, turns out the motion actuators had the wrong signs on the values. Easy fix.
I noticed the player didn’t rotate to follow the view while moving. Switched on Positive Pulse mode to fix it.
The rest is just my personal preference:
Changed player to red, added a material to the ground
Turned on GLSL and added a spotlight w/ shadow
Increased the sensitivity of the MouseLook script
Oh, and an issue with the viewport/minimap- if the game window isn’t full screen, the map sort of hangs off the side. If the view isn’t zoomed in so that the edges of the camera’s view are outside the window, it ends up looking sort of weird. I’d bet it’s the hard-coded window values in the script, maybe find a way to just calculate out a point from the bottom right corner? Like get the window height/width, divide by four or whatever amount of the screen you want, then subtract that from the window h/w to get the top and left edges (I think, something like that)
Like I said, I like it. Just needs some adjustments.
Well. I fixed the reversed strafe motion. And I did actually made the camera go free view without the character rotating with it. Because it would be awkward in games if the player kept on rotating with the camera. I can’t get my minimap to be correct so I just made it in the left corner of the screen.
Actually, what I was referring to was if you move while rotating the camera, the player would still face whatever direction they started moving from. With the pulse mode on, the player auto-faces the camera direction, but only while a movement key is pressed. Try it out, hold WAS or D and move the mouse.
OTO, he did say in the original post that there wasn’t any camera collision at the moment. Tho I guess the “cap” setting in the mouselook script could be used to keep it over the ground plane.
I just updated it. Hopefully, the minimap should be more in line. And the rotation of the player should follow the camera. I still don’t have any knowledge on camera collision, do anyone mind helping me?
Hi, I just updated the template with the dialog system I just wrote a while ago. (with the help of leonnn)
Instructions:
Go to the small cube.
Press spacebar when near it.
Press spacebar again to go to the next page.
sure it will.
Also it doesnt quite need to be your character you’re using on your character. Amakehuman character should be a good dummy character for this template imo.
Talking about char you should do a video tutorial aswell when you finish it. I cant see several such posts for some reason. So anyway you’re doing just fine and keep it up.