Ambiera ForumDiscussions, Help and Support. |
|
|
|||||
|
I am so happy I just bought CC 3 light - now to get started. Question (and I think this was asked before), I noticed the fps camera requires a mouse click to use and it seems the arrow keys are not fluid - it feels like it moves a little bit per press. (1) How can we make the mousemove work like almost all games - you move the mouse and the virtual head (camera) moves with it in all directions (no mouse click needed - since I would want to trap the mouse clicks for other purposes, like shooting and picking stuff up)? (2) How can we make the keyboard keys move more fluidly - and how can we change them (say we want W, A, S, D or something like that instead of the arrow keys)? (3) Can users change key preferences in game? Thanks in advance. Mike |
||||
|
For the mouse: There is an option in the behavior, something like 'move when mouse down' or similar, check that. It doesn't work exactly as in those games then, but as close as possible in WebGL/Flash. Keyboard keys are not changeable, AFAIK. |
||||
|
You were right about the camera - works great. The WASD keys are actually already set to work along with the ARROW keys, but I would love to know if and how we can map keys for other thing. Time to read the manual. Mike |
||||
|
That wasn't hard. Right from the online manual: function keyPressedDown(keyCode) { if (keyCode == 88) { // the user pressed the key 'X', move the 'cubeMesh1' scene node a bit up var cube = ccbGetSceneNodeFromName("cubeMesh1"); var pos3d = ccbGetSceneNodeProperty(cube, "Position"); pos3d.y += 2; ccbSetSceneNodeProperty(cube, "Position", pos3d); } } So, just build a custom menu somehow and then program key mapping with javascript. I assume you can create menus in CopperCube so you can adjust music volume, sound volume, etc. How about resolution? Can that be configured? Back to the manual. Mike |
||||
|
No where in the documentation does it talk about creating HUDs and MENUs. Can anyone expound on how to do this. Mike |
||||
|
Resolution cannot be configured at runtime (unless you are using Flash or WebGL), I'm sorry. :/ There are usual two ways to use HUDs: Either use the 2D Overlay feature from the editor, it comes with support of displaying single line text and images, as well as absolute or proportional (=resolution independent) sizing. Or alternatively, draw the HUD yourself: - In the Windows.exe or Mac OS X .app target using the draw..() functions from the API - In WebGL either using a HTML overlay (explained in the 2D Overlay tutorial) or using the draw...() functions of the renderer. - In Flash by embedding the created .swf in your own .swf, and creating whatever you want on top of that. |
||||
|
Can we create driving games in CopperCube? Flight games? Mike |
||||
|
You can make all you wish but you must know how to program. Pre-existent gameplay in Coppercube are limited...(but very interessant for the use of the engine) |
||||
|
Hi Niko, does this happen automatically or is there a snippet available on how to change it via runtime in WebGL? Thank you wrote:
Resolution cannot be configured at runtime (unless you are using Flash or WebGL), ... |
|