Page 1 of 2 12 LastLast
Results 1 to 40 of 41
  1. #1
    MSgt. Shooter Person
    Join Date
    Nov 2007
    Posts
    46

    Default Side-Scroller Camera

    I'm looking to prototype a game idea I had, and I'd like to keep it in kismet as much as possible, because I'm really not much of a programmer.

    At this point, i'm trying to make a 3rd person camera. I've followed the top-down game tutorial at 3d buzz until they reach the point of having the 3rd person camera, but it doesn't seem to be working with the UDK as it does with UT3. The camera is still displayed in 1st person, does anyone know how to get it working properly?

    The next step after that would be to have the player be constrained to the Y and Z axis.

  2. #2

    Default

    use a 'Level Loaded' [New Event > Level Loaded], 'Set Camera Target' [New Action > Camera > Set Camera Target], and an 'Attach to Actor' [New Action > Actor > Attach to Actor].

    Make a camera and place it where you would like it to be around the player, and attach it in kismet to 'cam target' and 'attachment' and set 'target' all players or player 0 [Variable > Player > Player]

    The only issue with this is that the crosshair points where the camera looks, and so you fire where the crosshair is. But that will get the camera setup.
    (All this was taken from HERE)

  3. #3
    Iron Guard
    Join Date
    Nov 2006
    Posts
    716

    Default

    The Whizzle development documentation would definitely be a good place to start. I just glanced over it the other day but I think it addresses a lot of the same issues that you would have.

  4. #4
    Palace Guard

    Join Date
    Jun 2007
    Location
    Christchurch
    Posts
    3,781

    Default

    I would avoid doing this in Kismet for two reasons.

    a) Kismet is per level and can't be used globally for many levels easily
    b) Kismet may or may not be replicated appropriately for some things

    Consider Kismet more of a complex level trigger system than an alternative to Unrealscript.

  5. #5

    Default

    Quote Originally Posted by MadGrenadier View Post
    use a 'Level Loaded' [New Event > Level Loaded], 'Set Camera Target' [New Action > Camera > Set Camera Target], and an 'Attach to Actor' [New Action > Actor > Attach to Actor].

    Make a camera and place it where you would like it to be around the player, and attach it in kismet to 'cam target' and 'attachment' and set 'target' all players or player 0 [Variable > Player > Player]

    The only issue with this is that the crosshair points where the camera looks, and so you fire where the crosshair is. But that will get the camera setup.
    (All this was taken from HERE)
    I'm probably doing something wrong (I just started on this engine), but for me that doesn't work. I've done all the steps, but when I enter the game, I still play normally, the camera maybe shows only during loading.

    EDIT: Adding a delay helped, but now it's a delay.
    Last edited by vonforum; 11-07-2009 at 04:30 PM.

  6. #6

    Default

    I noticed that Level Loaded doesn't work for me, either, but Level Startup does.

    The problem is, every time I re-open the map in the editor, the Level Startup changes to a Level Loaded. Which, of course, doesn't work again.

  7. #7

    Default

    Now that you mention it I remember having to use startup as well (tried this last night) My guess is that it would work if the map was loaded from the game, and the problem is from playing in editor. But I don't really know, I'm pretty new to the engine as well.

  8. #8
    Skaarj
    Join Date
    Nov 2009
    Location
    Fayetteville, NC
    Posts
    22
    Gamer IDs

    Gamertag: Bifuu

    Default

    To get this working for me (Camera at least, i havnt bothered to mess with constraints yet) with Kismet:

    Make sure you have a camera Actor placed in your map

    I started with Player Spawned -> Attach to Actor -> Set Camera Target -> Toggle Input (to off)

    Attach to Actor [Target:Player Attachment:Camera Actor] : Here is where your offset is set for your camera (How far away is it) so check "Use Relative Offset?" and Set its values in the fields (4 rows above the check box oddly), adjust the X value and use a positive value

    Set Camera Target [Target:Player CamTarget:Camera Actor] : This is telling the map to use the camera actor as the camera and not view things from the player

    Toggle Input [Target:Player] : Make sure you uncheck Toggle Movement in the properties. This basically makes it so when you move your mouse it doesnt throw off the side view of a platformer.


    this should set your camera up, but you can still move on he X plane so its not a true 2D platformer yet, Im not sure myself with how to do the constrains as im still trying to learn where all the scripting goes into the game at haha. Hope this helped some to someone

  9. #9
    Skaarj
    Join Date
    Nov 2009
    Location
    Poland
    Posts
    3

    Default

    I'm looking into sidescroller too. I've downloaded UT2D mod from moddb, there are scripts sources released under GPL license, but unfortunately there are some differences between UTGame from UDK and UT3, and scripts doesn't compile. Something is wrong with ServerViewSelf() function, but I've just started learning scripting, and don't know how to fix it yet.

  10. #10

    Default

    How did you create a camera actor?

  11. #11
    MSgt. Shooter Person
    Join Date
    Nov 2007
    Location
    Lisbon, Portugal
    Posts
    43
    Gamer IDs

    Gamertag: Masakari666

    Default

    Yeah, i've been working on this as well, as the indie prototype i'm doing is a side scrolling rpg, but i've hit some difficulties with the UT2D stuff as well, and the 3d buzz top down game doesn't work as well, there's some differences with UDK which seem to prevent it from doing what we want with the old UT3 code.

  12. #12
    Skaarj
    Join Date
    Nov 2009
    Location
    Fayetteville, NC
    Posts
    22
    Gamer IDs

    Gamertag: Bifuu

    Default

    Quote Originally Posted by Onox View Post
    How did you create a camera actor?
    Open the Content browser, go to the Class Actors page, select CameraActor, then back to the editor right click where you want to place it and choose "add CameraActor Here"

  13. #13

    Default

    I'm trying to figure out how to do with in UnrealScript as well.


    It looks like theres gonna be alot of people to help each other in this initial wave of UDK startups.

  14. #14

    Default

    Thank you for telling me how to create the actor camera. Now that I have kismet open, what do I attach the cam target too?

  15. #15

    Default

    Cam Target attaches to the camera you just made
    Last edited by MadGrenadier; 11-08-2009 at 12:38 AM. Reason: Different Question

  16. #16
    Redeemer
    Join Date
    Sep 2006
    Location
    Ohio
    Posts
    1,113
    Gamer IDs

    Gamertag: McBrightside

    Default

    I'm interested in making a third-person shooter. Can anyone think of a work-around for how the gun is held by the player? Right now the player is in a neutral stance when the camera is offset, you can fire but you can look up or down and the shot comes from a weird angle seeing as the player's gun is pointed straight up.

    Any thoughts on a fix?

  17. #17
    Skaarj
    Join Date
    Nov 2009
    Location
    Fayetteville, NC
    Posts
    22
    Gamer IDs

    Gamertag: Bifuu

    Default

    Quote Originally Posted by Onox View Post
    Thank you for telling me how to create the actor camera. Now that I have kismet open, what do I attach the cam target too?
    I started with Player Spawned -> Attach to Actor -> Set Camera Target -> Toggle Input (to off)

    Attach to Actor [Target:Player Attachment:Camera Actor] : Here is where your offset is set for your camera (How far away is it) so check "Use Relative Offset?" and Set its values in the fields (4 rows above the check box oddly), adjust the X value and use a positive value

    Set Camera Target [Target:Player CamTarget:Camera Actor] : This is telling the map to use the camera actor as the camera and not view things from the player

    Toggle Input [Target:Player] : Make sure you uncheck Toggle Movement in the properties. This basically makes it so when you move your mouse it doesnt throw off the side view of a platformer.


    The brackets ( []'s ) show the attachments under it, if you are wondering how to get the Camera actor in Kismet, Have it selected on the editor, then in kismet when you right click you should see an option that says something like "Use CameraActor_0" or something similar, and it will place the circle for it in Kismet

  18. #18

    Default

    Thanks Bifuu. I got it yesterday by myself after figuring out some simple things with kismet. The only thing I took from your post was the toggle movement part. I wasn't sure where to find that.

  19. #19

    Default

    Quote Originally Posted by Bifuu View Post
    I started with Player Spawned -> Attach to Actor -> Set Camera Target -> Toggle Input (to off)

    Attach to Actor [Target:Player Attachment:Camera Actor] : Here is where your offset is set for your camera (How far away is it) so check "Use Relative Offset?" and Set its values in the fields (4 rows above the check box oddly), adjust the X value and use a positive value

    Set Camera Target [Target:Player CamTarget:Camera Actor] : This is telling the map to use the camera actor as the camera and not view things from the player

    Toggle Input [Target:Player] : Make sure you uncheck Toggle Movement in the properties. This basically makes it so when you move your mouse it doesnt throw off the side view of a platformer.


    The brackets ( []'s ) show the attachments under it, if you are wondering how to get the Camera actor in Kismet, Have it selected on the editor, then in kismet when you right click you should see an option that says something like "Use CameraActor_0" or something similar, and it will place the circle for it in Kismet
    What if I just want to restrict aim so I can only aim up and down because toggling aim doesn't allow aim at all (which I understand).

  20. #20
    Skaarj
    Join Date
    Nov 2009
    Location
    Fayetteville, NC
    Posts
    22
    Gamer IDs

    Gamertag: Bifuu

    Default

    Quote Originally Posted by Onox View Post
    What if I just want to restrict aim so I can only aim up and down because toggling aim doesn't allow aim at all (which I understand).
    That i dont know how to do yet sorry =/ i wish i could be of more help but im still working on stuff like that through scripting.

  21. #21
    MSgt. Shooter Person
    Join Date
    Nov 2007
    Location
    Paris
    Posts
    98

    Default

    I've played with CameraActor a while ago. it may help: http://forums.revora.net/index.php?showtopic=59943

  22. #22
    Skaarj
    Join Date
    Nov 2009
    Location
    Fayetteville, NC
    Posts
    22
    Gamer IDs

    Gamertag: Bifuu

    Default

    Oh nice ill find this useful thanks

  23. #23
    Palace Guard

    Join Date
    Jun 2007
    Location
    Christchurch
    Posts
    3,781

    Default

    To do this in Unrealscript is pretty simple.

    Create a new gametype which creates a new type of pawn. The pawn can define how the camera is calculated for the player controller.

    This is just one of the many ways to do it

  24. #24
    MSgt. Shooter Person
    Join Date
    Nov 2007
    Location
    Lisbon, Portugal
    Posts
    43
    Gamer IDs

    Gamertag: Masakari666

    Default

    Quote Originally Posted by Solid Snake View Post
    I would avoid doing this in Kismet for two reasons.

    a) Kismet is per level and can't be used globally for many levels easily
    b) Kismet may or may not be replicated appropriately for some things

    Consider Kismet more of a complex level trigger system than an alternative to Unrealscript.
    Quote Originally Posted by Solid Snake View Post
    To do this in Unrealscript is pretty simple.

    Create a new gametype which creates a new type of pawn. The pawn can define how the camera is calculated for the player controller.

    This is just one of the many ways to do it
    Just a quick question Snake - there have been multiple posts about this, and there always UT2D, and the 3d buzz videos, but what i'm curious about is actually the approach - script vs Kismet. Most people in the forum just use Kismet, you mention doing it using script is better. Whizzle uses the Kismet method, curiously.

    Way i see it, doing it by script is almost like hardcoding it, while doing it by Kismet is more flexible, but also less reliable. Am i getting the correct idea?

  25. #25
    Marrow Fiend

    Join Date
    Jul 2006
    Location
    WorldInfo_61
    Posts
    4,198
    Gamer IDs

    Gamertag: KickedWhoCares

    Default

    Quote Originally Posted by Masakari View Post
    Way i see it, doing it by script is almost like hardcoding it, while doing it by Kismet is more flexible, but also less reliable. Am i getting the correct idea?
    I dont think you are. In my opinion scripting is the more flexible of the two options, if anything kismet is more of a hardcode and will cause problems with script not the other way around.

    Kismet is best for speed from what I hear, Ive avoided it for the most part. While it can be fast its a waste of time as I feel any uscript can be adapted for multiple purposes where kismet is less flexible in that area.

    Even the creation of static meshes in uscript can be beneficial vs the editor, though the editor is more user friendly I guess. It certainly isnt code friendly and if possible Id like to see more effort made to intergrate the two seamlessly. There are plenty of other engines and plugins out there that show the true power of a visual scripting system (as solidsnake mentioned kismet is not) its more of a glorified trigger system.

    For example theres systems like Ice and Orbaz' particle flow tools which allow developers to get right down in there block by block. If you want new kismet boxes you need to use text+uscript, most of the inbuilt blocks are all native. Pure uscript on the other hand doesnt contain native code

  26. #26
    Skaarj
    Join Date
    Nov 2009
    Location
    Fayetteville, NC
    Posts
    22
    Gamer IDs

    Gamertag: Bifuu

    Default

    Quote Originally Posted by Solid Snake View Post
    To do this in Unrealscript is pretty simple.

    Create a new gametype which creates a new type of pawn. The pawn can define how the camera is calculated for the player controller.

    This is just one of the many ways to do it
    cool thanks for pointing me in the right direction for that

  27. #27

    Default

    How do you add a pawn to the map anyways? Is it an actor or what?

    Also, how do you access Unreal script and is there a place to learn it? I've learned quite quickly that Kismet can't do everything. It's more like a bunch of If,Then statements.

  28. #28
    MSgt. Shooter Person
    Join Date
    Nov 2007
    Location
    Lisbon, Portugal
    Posts
    43
    Gamer IDs

    Gamertag: Masakari666

    Default

    Quote Originally Posted by MonsOlympus View Post
    I dont think you are. In my opinion scripting is the more flexible of the two options, if anything kismet is more of a hardcode and will cause problems with script not the other way around.

    Kismet is best for speed from what I hear, Ive avoided it for the most part. While it can be fast its a waste of time as I feel any uscript can be adapted for multiple purposes where kismet is less flexible in that area.

    Even the creation of static meshes in uscript can be beneficial vs the editor, though the editor is more user friendly I guess. It certainly isnt code friendly and if possible Id like to see more effort made to intergrate the two seamlessly. There are plenty of other engines and plugins out there that show the true power of a visual scripting system (as solidsnake mentioned kismet is not) its more of a glorified trigger system.

    For example theres systems like Ice and Orbaz' particle flow tools which allow developers to get right down in there block by block. If you want new kismet boxes you need to use text+uscript, most of the inbuilt blocks are all native. Pure uscript on the other hand doesnt contain native code
    Thank you MonsOlympus, i got the idea now.

    @Onox: a Pawn is the base class of all actors. From the UDN:

    Controllers are the base of either input-based decisions from players or logically-determinned decisions from Game AI. Controllers are non-physical Actors that can be attached to a Pawn to control its actions.

    A Pawn, therefore, is the base class of all actors that can be controlled by players or AI. Pawns are the physical representations of players and creatures in a level. Pawns have a mesh, collision, and physics. Pawns can take damage, make sounds, and hold weapons and other inventory. In short, they are responsible for all physical interaction between the player or AI and the world.

    Controllers receive notifications for many of the events occuring for the Pawn they are controlling. This gives the Controller the opportunity to implement the behavior in response to this event, intercepting the event and superceding the Pawn's default behavior.

    PlayerControllers are used by human players to control Pawns, while AIControllers implement the artificial intelligence for the Pawns they control. Controllers take control of a Pawn using their Possess() method, and relinquish control of the pawn by calling UnPossess().

  29. #29

    Default

    Thank you for answering my question Masakari. I'm glad everyone on this forum is willing to help each other out.

  30. #30
    MSgt. Shooter Person
    Join Date
    Nov 2007
    Posts
    46

    Default

    Okay, I think I may have gotten the UT2D game type working, because kismet is not nearly powerful enough for what I'm wanting to do. How do I change the UDK's default gametype? (Ie. the gametype that is used when you right click -> play from here)

  31. #31
    Skaarj
    Join Date
    Nov 2009
    Location
    Fayetteville, NC
    Posts
    22
    Gamer IDs

    Gamertag: Bifuu

    Default

    I cant check while im in class, but you need to change the ini files in the editor folder (i think?) to change this for the editor

  32. #32
    MSgt. Shooter Person
    Join Date
    Nov 2007
    Posts
    46

    Default

    Oh, I got it. If anyone is interested, it's in UTGame.ini, it has a default game type.

  33. #33

    Default

    How did you solve the problem with "unreliable server function ServerViewSelf()" from UT2D? I am stuck here...

  34. #34

    Default Simple 2D Camera (it's a start anyway)

    I've been playing around with calccamera which seems rather simple way to get different camera results. Here's a simple way I got a 2D camera going without using kismet, kismet seemed to lock onto the players movement so if you turned around and went the other way the camera would stay facing the side (of the player) it was originally focused on and end up facing the wrong direction (if that makes sense) this code actually gave me the results I've been looking for without much effort and always stays looking down the positive X axis no matter what my Pawn does. Once I figure out how to constrain the Pawn to something(hopefully a path so I can have a more dynamic 2d sidescroller) i'll change the code so it isn't hardcoded to this direction but go off the angle the pawn will be on.

    I had to change to bBehindView=true to see the player's mesh.
    I just put this in my Pawn class which extended UTPawn

    Code:
    simulated function bool CalcCamera( float fDeltaTime, out vector out_CamLoc, out rotator out_CamRot, out float out_FOV )
    {
    	local vector CameraStart;
    	
    	//Start at the player's location.
    	CameraStart = Location;
    
    	//Set the Z Offset (how high or low the camera is.
    	CameraZOffset = GetPawnViewLocation().Z;
    
    	//Set the Camera Z Offset
    	CameraStart.Z += CameraZOffset;
    
    	//Since we want to look down the Positive X axis lets move
    	//away from our player down the negitive X axis
    	CameraStart.X += -512;
    
    	//Set final location
    	out_CamLoc = CameraStart;
    
    	//setting the Yaw to -90 rotated the camera to look down the x axis
    	out_CamRot.Yaw = -90;
    
    	//Setting the Pitch to 90 locked the camera so it doesn't rotate up and down.
    	out_CamRot.Pitch = 90;
    
    	return true;
    }
    **Edit

    just found SetLocation() and SetRotation() which could essentially be used to constrain the player to a certain path

    Code:
    local var vector newLocation;
    newLocation = Location;
    newLocation.X = 0;      //Makes sure the player never leaves the x origin.
    
    SetLocation(newLocation);
    hope it helps.

    Artimus
    Last edited by artimusp; 11-22-2009 at 01:48 PM.

  35. #35

    Default

    Quote Originally Posted by freeflyklown View Post
    How did you solve the problem with "unreliable server function ServerViewSelf()" from UT2D? I am stuck here...
    im stuck in that too, please help

  36. #36
    Prisoner 849
    Join Date
    Nov 2007
    Location
    Austin, Tx.
    Posts
    858

    Default

    I just commented it out.

  37. #37

    Default

    where? i have the camera working in kismet but i want to try this mod

  38. #38
    MSgt. Shooter Person
    Join Date
    Dec 2007
    Posts
    144

    Default

    Does anyone have a sample unreal script for the side scrolling, looking over this thread it seems like we have two options, im more of a scripter and would prefer setting up this way..

    artimusp have you had any more luck with your scripting and if so willing to post your new results?
    ----
    Gateway
    Game Designer -- Web Designer

  39. #39

    Default

    Quote Originally Posted by Gateway View Post
    Does anyone have a sample unreal script for the side scrolling, looking over this thread it seems like we have two options, im more of a scripter and would prefer setting up this way..

    artimusp have you had any more luck with your scripting and if so willing to post your new results?
    Haven't actually tried it myself, but it seems that the Documentation for Whizzle has an easy way of doing it, just substitute z for x axis (since its side scrolling, not top scrolling) - just scroll down to movement, constraints.

    (Whizzle Doc can be found here - http://developer.download.nvidia.com...cument_1_2.doc)


    I also want to set up side scrolling, but not for the whole game; just as part of my cover system (i.e. when they move up against the wall, it snaps them to the wall and constrains them to left and right movement until they hit a button to disengage), which is based on triggers.

    Does anyone know either:

    a) how to set up side scrolling movement (I have the camera working) via Kismet?

    or

    b) How to bind an unrealscript to an in-game trigger (I have a basic understanding of programming/scripting, but not sure how to tie kismet and unrealscript together)

  40. #40
    Iron Guard
    Join Date
    Jun 2009
    Location
    Where the ganja is plentiful
    Posts
    717
    Gamer IDs

    Gamertag: PSN: ShurikenUK

    Default

    Quote Originally Posted by Solid Snake View Post
    To do this in Unrealscript is pretty simple.

    Create a new gametype which creates a new type of pawn. The pawn can define how the camera is calculated for the player controller.

    This is just one of the many ways to do it
    Silly question, but... How would I do this? I really want to learn scripting, but every tutorial I've followed (lots) just completely fails to do ANYTHING that is even remotely close to what it says on the tin.

    I know you cant learn something your not interested in, which is why I got a G or lower for french GCSE's, but I AM interested in Uscript, but find it harder than trying to explain the theory of quantum-physics in hebrew while trying to tightrope across a windy crevasse home to a carnivorous species of birds that hate humans.

    Just to successfully do ONE simple thing in script (simple? lol) would be great! but instead it just messes up the whole installation and I have to re-install.
    There is no religion except that of Music. There is no god, except that of your own will to create music.
    -Ancient Texts of Truth


 
Page 1 of 2 12 LastLast

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Copyright ©2009-2011 Epic Games, Inc. All Rights Reserved.
Digital Point modules: Sphinx-based search vBulletin skin by CompletevB.com.